services
build-and-push / detect (push) Successful in 7s
build-and-push / build (${{ fromJSON(needs.detect.outputs.services) }}) (push) Failing after 3m33s

This commit is contained in:
2026-08-26 11:04:23 +03:00
parent 4bd1512994
commit c231be0094
1424 changed files with 1076244 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
package dbr
import "strings"
const (
openingSQLComment = "/*"
closingSQLComment = "*/"
space = " "
newline = "\n"
emptyString = ""
)
// Comments represents a set of sql comments
type Comments []string
// Append a new sql comment to a set of comments
func (comments Comments) Append(comment string) Comments {
comment = strings.Replace(comment, openingSQLComment, emptyString, -1)
comment = strings.Replace(comment, closingSQLComment, emptyString, -1)
comment = strings.TrimSpace(comment)
comments = append(comments, comment)
return comments
}
// Build writes each comment in the form of "/* some comment */\n"
func (comments Comments) Build(d Dialect, buf Buffer) error {
for _, comment := range comments {
words := []string{openingSQLComment, space, comment, space, closingSQLComment, newline}
for _, str := range words {
if _, err := buf.WriteString(str); err != nil {
return err
}
}
}
return nil
}