Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CodeGenerator ¶
type CodeGenerator struct {
EnumsPkgName string
// contains filtered or unexported fields
}
func NewCodeGenerator ¶
func NewCodeGenerator() (*CodeGenerator, error)
NewCodeGenerator initializes and returns a new CodeGenerator with parsed templates
func (*CodeGenerator) GenerateCode ¶
GenerateCode generates the enum code based on the provided package name, type name, and constants
func (*CodeGenerator) GenerateTests ¶
func (cg *CodeGenerator) GenerateTests( pkg string, pkgDir string, importPath string, name string, consts []string, ) error
GenerateTests generates test code for the enum type and writes it to a file
Click to show internal directories.
Click to hide internal directories.