Documentation ¶
Index ¶
Constants ¶
View Source
const ( // EmptyString is an empty golang string EmptyString = "\"\"" // Nil is nil Nil = "nil" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FuncDecl ¶
FuncDecl provides the structure of a golang function definition. ast.FuncDecl was too complex.
type GoWriter ¶
type GoWriter interface { WritePackage(string) WriteImport(string) WriteCall(...string) error WithFunc(string, []FuncParam, []string, Block) error WithMethod(string, string, []FuncParam, []string, Block) error WithIf(string, Block, ...interface{}) error WithIter(string, Block, ...interface{}) error WithStruct(string, Block) error WithInterface(string, Block) error Returns(...string) error Println(string, ...interface{}) error Comment(string, ...interface{}) }
GoWriter defines an interface with a simple api for writing go code.
func NewGoWriter ¶
NewGoWriter returns an instance of the GoWriter interface which is useful for writing golang code.
type SingleQuotedStringList ¶
type SingleQuotedStringList []string
SingleQuotedStringList will return itself as a comma delimited list of quoted strings when stringified.
func (SingleQuotedStringList) String ¶
func (l SingleQuotedStringList) String() string
type StringSliceLiteral ¶
type StringSliceLiteral []string
StringSliceLiteral will return itself as the golang literal syntax for string slices.
func (StringSliceLiteral) String ¶
func (l StringSliceLiteral) String() string
Click to show internal directories.
Click to hide internal directories.