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

Function EnumReplace

internal/codegen/golang/enum.go:44–46  ·  view source on GitHub ↗

EnumReplace removes all non ident symbols (all but letters, numbers and underscore) and returns valid ident name for provided name.

(value string)

Source from the content-addressed store, hash-verified

42// EnumReplace removes all non ident symbols (all but letters, numbers and
43// underscore) and returns valid ident name for provided name.
44func EnumReplace(value string) string {
45 return strings.Map(enumReplacer, value)
46}
47
48// EnumValueName removes all non ident symbols (all but letters, numbers and
49// underscore) and converts snake case ident to camel case.

Callers 2

buildEnumsFunction · 0.85
EnumValueNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected