MCPcopy Create free account
hub / github.com/go-pg/pg / appendComment

Function appendComment

orm/util.go:156–163  ·  view source on GitHub ↗

appendComment adds comment in the header of the query into buffer

(b []byte, name string)

Source from the content-addressed store, hash-verified

154
155// appendComment adds comment in the header of the query into buffer
156func appendComment(b []byte, name string) []byte {
157 if name == "" {
158 return b
159 }
160 name = strings.ReplaceAll(name, `/*`, `/\*`)
161 name = strings.ReplaceAll(name, `*/`, `*\/`)
162 return append(b, fmt.Sprintf("/* %s */ ", name)...)
163}

Callers 9

util_test.goFile · 0.85
AppendQueryMethod · 0.85
AppendQueryMethod · 0.85
AppendQueryMethod · 0.85
AppendQueryMethod · 0.85
AppendQueryMethod · 0.85
AppendQueryMethod · 0.85
AppendQueryMethod · 0.85
AppendQueryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…