MCPcopy
hub / github.com/sqlc-dev/sqlc / isValidDollarTagContent

Function isValidDollarTagContent

internal/sql/sqlfile/split.go:225–235  ·  view source on GitHub ↗

isValidDollarTagContent returns true if s contains only valid characters for a dollar tag.

(s string)

Source from the content-addressed store, hash-verified

223
224// isValidDollarTagContent returns true if s contains only valid characters for a dollar tag.
225func isValidDollarTagContent(s string) bool {
226 if s == "" {
227 return true // $$ is valid
228 }
229 for _, ch := range s {
230 if !isValidDollarTagChar(byte(ch)) {
231 return false
232 }
233 }
234 return true
235}
236
237// isValidDollarTagChar returns true if ch is a valid character in a dollar tag.
238// Valid characters are alphanumeric and underscore.

Callers 1

extractDollarTagFunction · 0.85

Calls 1

isValidDollarTagCharFunction · 0.85

Tested by

no test coverage detected