Documentation ¶
Overview ¶
Package config contains the configuration information used by enumgen
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // [def: .] the source directory Dir string `def:"." desc:"the source directory"` // [def: enumgen.go] the output file Output string `def:"enumgen.go" desc:"the output file"` // whether to generate methods that implement the SQL Scanner and Valuer interfaces SQL bool `desc:"whether to generate methods that implement the SQL Scanner and Valuer interfaces"` // [def: true] whether to generate text marshaling methods Text bool `def:"true" desc:"whether to generate text marshaling methods"` // whether to generate JSON marshaling methods (note that text marshaling methods will also work for JSON, so this should be unnecessary in almost all cases; see the text option) JSON bool `` /* 182-byte string literal not displayed */ // whether to generate YAML marshaling methods YAML bool `desc:"whether to generate YAML marshaling methods"` // whether to generate GraphQL marshaling methods for gqlgen GQL bool `desc:"whether to generate GraphQL marshaling methods for gqlgen"` // if specified, the enum item transformation method (eg: snake, kebab, lower) Transform string `desc:"if specified, the enum item transformation method (eg: snake, kebab, lower)"` // if specified, a comma-separated list of prefixes to trim from each item TrimPrefix string `desc:"if specified, a comma-separated list of prefixes to trim from each item"` // if specified, the prefix to add to each item AddPrefix string `desc:"if specified, the prefix to add to each item"` // whether to use line comment text as printed text when present LineComment bool `desc:"whether to use line comment text as printed text when present"` // a comment to include at the top of the generated code Comment string `desc:"a comment to include at the top of the generated code"` }
Config contains the configuration information used by enumgen
Click to show internal directories.
Click to hide internal directories.