Documentation ¶
Index ¶
- func UnmanagedName(name string) string
- type Field
- type FieldOptions
- type Generator
- type SaveContext
- func (sc *SaveContext) Save() error
- func (sc *SaveContext) WriteHelpers() error
- func (sc *SaveContext) WriteImports() error
- func (sc *SaveContext) WriteLine(format string, a ...any)
- func (sc *SaveContext) WriteStructAllocator(st *Struct) error
- func (sc *SaveContext) WriteStructDeclaration(st *Struct) error
- func (sc *SaveContext) WriteStructFieldsSetters(st *Struct) error
- func (sc *SaveContext) WriteStructs() error
- func (sc *SaveContext) WriteTemplate(name string, code string, funcMap template.FuncMap, data any) error
- type Struct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnmanagedName ¶
Types ¶
type FieldOptions ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func New ¶
func New(pf *parser.ParsedFile) *Generator
type SaveContext ¶
type SaveContext struct {
// contains filtered or unexported fields
}
func (*SaveContext) Save ¶
func (sc *SaveContext) Save() error
func (*SaveContext) WriteHelpers ¶ added in v0.1.0
func (sc *SaveContext) WriteHelpers() error
func (*SaveContext) WriteImports ¶
func (sc *SaveContext) WriteImports() error
func (*SaveContext) WriteLine ¶
func (sc *SaveContext) WriteLine(format string, a ...any)
func (*SaveContext) WriteStructAllocator ¶
func (sc *SaveContext) WriteStructAllocator(st *Struct) error
func (*SaveContext) WriteStructDeclaration ¶
func (sc *SaveContext) WriteStructDeclaration(st *Struct) error
func (*SaveContext) WriteStructFieldsSetters ¶
func (sc *SaveContext) WriteStructFieldsSetters(st *Struct) error
func (*SaveContext) WriteStructs ¶
func (sc *SaveContext) WriteStructs() error
func (*SaveContext) WriteTemplate ¶
type Struct ¶
type Struct struct {
// contains filtered or unexported fields
}
func (*Struct) AddField ¶
func (gs *Struct) AddField(names []string, typeName string, tags parser.ParsedTags, opts FieldOptions)
Click to show internal directories.
Click to hide internal directories.