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

Function JSONTagName

internal/codegen/golang/field.go:44–52  ·  view source on GitHub ↗
(name string, options *opts.Options)

Source from the content-addressed store, hash-verified

42}
43
44func JSONTagName(name string, options *opts.Options) string {
45 style := options.JsonTagsCaseStyle
46 idUppercase := options.JsonTagsIdUppercase
47 if style == "" || style == "none" {
48 return name
49 } else {
50 return SetJSONCaseStyle(name, style, idUppercase)
51 }
52}
53
54func SetCaseStyle(name string, style string) string {
55 switch style {

Callers 3

buildEnumsFunction · 0.85
buildStructsFunction · 0.85
columnsToStructFunction · 0.85

Calls 1

SetJSONCaseStyleFunction · 0.85

Tested by

no test coverage detected