Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateEnums ¶
func GenerateEnums(cfg EnumConfig) error
GenerateEnums generates Go source files for all enums in the config.
Types ¶
type Enum ¶
type Enum struct {
Name string // Type name, e.g. "UserStatus"
Values []string // Enum values, e.g. ["none", "active", "disabled"]
Sensitive bool // If true, UnmarshalJSON is case-sensitive (no ToLower)
}
Enum defines a single enum type configuration.
type EnumConfig ¶
type EnumConfig struct {
Package string // Target package name, e.g. "constants"
Output string // Output directory, defaults to "."
Enums []Enum // List of enums to generate
}
EnumConfig is the top-level configuration for enum generation.
Click to show internal directories.
Click to hide internal directories.