Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoCodeGenerator ¶
type GoCodeGenerator struct {
// contains filtered or unexported fields
}
GoCodeGenerator generates Go code and formats it
func NewGoCodeGenerator ¶
func NewGoCodeGenerator(tmpl *template.Template) *GoCodeGenerator
NewGoCodeGenerator returns a new GoCodeGenerator
func (*GoCodeGenerator) Generate ¶
func (g *GoCodeGenerator) Generate(name string, param interface{}) ([]byte, error)
Generate executes the template and formats it
func (*GoCodeGenerator) GenerateTo ¶
func (g *GoCodeGenerator) GenerateTo(name string, param interface{}, path string) error
GenerateTo is similar to Generate, but the result is written into the file with the specified path
Click to show internal directories.
Click to hide internal directories.