Documentation ¶
Overview ¶
Package gen contains some internal utilities for code generation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CapFirst ¶
CapFirst capitializes the first letter of a string. This function is undefined for non lowercase english alphabet characters.
func LowerFirst ¶
LowerFirst lowercases the first letter of a string. This function is undefined for non uppercase english alphabet characters.
func NewPackage ¶
func NewPackage(packageName string) func(template string, filename string, objects []interface{}, imports ...string)
NewPackage is given a packageName and returns a function, which when called generates code for a specific package. Each call of the returned function is used to generate a specific file. Given a template, filename, a list of objects which will each be used to execute the template and some top level imports the file is generated.
Types ¶
This section is empty.