Versions in this module Expand all Collapse all v1 v1.0.1 Dec 6, 2021 Changes in this version + func CommentGroup(comments ...string) *ast.CommentGroup + func ConstChar(args ...string) *ast.GenDecl + func ConstFloat(args ...string) *ast.GenDecl + func ConstImaginary(args ...string) *ast.GenDecl + func ConstInt(args ...string) *ast.GenDecl + func ConstString(args ...string) *ast.GenDecl + func Declarations(blocks ...string) ([]ast.Decl, error) + func ExprString(expr ast.Expr) string + func FieldList(fields ...string) (*ast.FieldList, error) + func FormattedSource(file *ast.File, output string) ([]byte, error) + func PackageDoc(file *ast.File, comments ...string) *ast.File + func Public(name string) *ast.Ident + func Sanitize(name string) string + func SimpleType(name string) ast.Expr + func Snippets(val interface{}, snippets ...string) ([]ast.Decl, error) + func String(s string) *ast.BasicLit + func Struct(args ...ast.Expr) *ast.StructType + func TagKey(field *ast.Field, key string) string + func ToString(expr ast.Expr) (string, error) + func TypeDecl(name *ast.Ident, typ ast.Expr) *ast.GenDecl + type Function struct + func Func(name string) *Function + func (fn *Function) Args(args ...string) *Function + func (fn *Function) Body(format string, v ...interface{}) *Function + func (fn *Function) BodyTmpl(tmpl string, dot interface{}) *Function + func (fn *Function) Comment(s string) *Function + func (fn *Function) Decl() (*ast.FuncDecl, error) + func (fn *Function) MustDecl() *ast.FuncDecl + func (fn *Function) Name() string + func (fn *Function) Receiver(receiver string) *Function + func (fn *Function) Returns(values ...string) *Function