Documentation ¶
Index ¶
- type Generator
- func (g *Generator) GenerateAFOP(pkgName string, structName string, sts []*StructField) (string, error)
- func (g *Generator) GenerateAFOPWithoutNew(pkgName string, structName string, sts []*StructField) (string, error)
- func (g *Generator) GenerateFOP(pkgName string, structName string, sts []*StructField) (string, error)
- func (g *Generator) GenerateFOPWithoutNew(pkgName string, structName string, sts []*StructField) (string, error)
- type StructField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func InitializeGenerator ¶
func InitializeGenerator() *Generator
func (*Generator) GenerateAFOP ¶
func (g *Generator) GenerateAFOP(pkgName string, structName string, sts []*StructField) (string, error)
GenerateAFOP is the function to generate code of Applicable Functional Option Pattern from struct
func (*Generator) GenerateAFOPWithoutNew ¶
func (g *Generator) GenerateAFOPWithoutNew(pkgName string, structName string, sts []*StructField) (string, error)
GenerateAFOPWithoutNew is the function to generate code of Applicable Functional Option Pattern from struct
func (*Generator) GenerateFOP ¶
func (g *Generator) GenerateFOP(pkgName string, structName string, sts []*StructField) (string, error)
GenerateFOP is the function to generate code of Functional Option Pattern from struct
func (*Generator) GenerateFOPWithoutNew ¶
func (g *Generator) GenerateFOPWithoutNew(pkgName string, structName string, sts []*StructField) (string, error)
GenerateFOPWithoutNew is the function to generate code of Functional Option Pattern from struct
type StructField ¶
Click to show internal directories.
Click to hide internal directories.