Documentation ¶
Index ¶
- func GetReceiver(obj *types.Named) string
- func IsStringer(obj *types.Named) bool
- func WriteMultiCaseStatement(values []Value, receiver string) string
- func WriteReadSingleCaseStatement(values []Value, receiver string, assgnVar string, typeName string, ...) string
- type File
- type Generator
- func (g *Generator) Format() ([]byte, error)
- func (g *Generator) Generate(typeName string) error
- func (g *Generator) GenerateWithJen(typeName string, args []string) error
- func (g *Generator) Output() []byte
- func (g *Generator) ParsePackage(patterns []string, tags []string) error
- func (g *Generator) Printf(format string, args ...interface{})
- func (g *Generator) WritePreambleAndImports(args []string)
- type Opt
- type Package
- type Value
- type ValueType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetReceiver ¶
func IsStringer ¶
func WriteMultiCaseStatement ¶
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func (*Generator) GenerateWithJen ¶ added in v0.0.4
func (*Generator) ParsePackage ¶
func (*Generator) WritePreambleAndImports ¶ added in v0.0.3
type Opt ¶
type Opt func(g *Generator)
func WithAllFunc ¶ added in v0.0.4
func WithAllFunc() Opt
func WithErrorOnUnknown ¶
func WithErrorOnUnknown() Opt
func WithOnlyJsonMethods ¶
func WithOnlyJsonMethods() Opt
func WithOnlySQLMethods ¶
func WithOnlySQLMethods() Opt
func WithUseStringer ¶
func WithUseStringer() Opt
Click to show internal directories.
Click to hide internal directories.