Documentation ¶
Index ¶
- func ExprDeclString(fset *token.FileSet, e ast.Expr) string
- func ForEachDeclInPackage(p *packages.Package, do func(ast.Decl))
- func ForEachFuncDeclInFile(file *ast.File, do func(*ast.FuncDecl))
- func ForEachFuncDeclInPackage(p *packages.Package, do func(*ast.FuncDecl))
- func ForEachInterfaceDeclInFile(file *ast.File, do func(name string, methods []*ast.Field))
- func ForEachInterfaceDeclInPackage(p *packages.Package, do func(name string, methods []*ast.Field))
- func FuncDeclString(fset *token.FileSet, fn *ast.FuncDecl) string
- func ParamInfoListDeclString(params []*FieldDeclInfo) string
- func ParamInfoListFixup(paramInfos []*FieldDeclInfo)
- func ParamInfoListInvokeString(params []*FieldDeclInfo) string
- func ParamInfoListNameExists(paramInfos []*FieldDeclInfo, name string) bool
- func ParamInfoListTypeOnlyDeclString(paramInfos []*FieldDeclInfo) string
- func ParamListDeclString(fset *token.FileSet, fl *ast.FieldList) string
- func ReceiverDeclString(fset *token.FileSet, fl *ast.FieldList) string
- func ReturnDeclString(fset *token.FileSet, fl *ast.FieldList) string
- func ReturnInfoListDeclString(returns []*FieldDeclInfo) string
- type FieldDeclInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExprDeclString ¶
ExprDeclString returns declarative string for AST Expr object
func ForEachDeclInPackage ¶
ForEachDeclInPackage iterates all AST Decl objects in a AST syntactic package
func ForEachFuncDeclInPackage ¶
ForEachFuncDeclInPackage iterates all AST FuncDecl objects in a AST syntactic package
func ParamInfoListDeclString ¶
func ParamInfoListDeclString(params []*FieldDeclInfo) string
func ParamInfoListFixup ¶
func ParamInfoListFixup(paramInfos []*FieldDeclInfo)
func ParamInfoListInvokeString ¶ added in v0.1.6
func ParamInfoListInvokeString(params []*FieldDeclInfo) string
func ParamInfoListNameExists ¶
func ParamInfoListNameExists(paramInfos []*FieldDeclInfo, name string) bool
func ParamInfoListTypeOnlyDeclString ¶ added in v0.1.6
func ParamInfoListTypeOnlyDeclString(paramInfos []*FieldDeclInfo) string
ParamInfoListTypeOnlyDeclString returns declarative string from parameter field declarations, the returned declarative string contains only type declarations
func ParamListDeclString ¶
ParamListDeclString returns declarative string for AST FieldList object
func ReturnDeclString ¶
ReturnDeclString returns declative string for the given AST field list
func ReturnInfoListDeclString ¶ added in v0.1.6
func ReturnInfoListDeclString(returns []*FieldDeclInfo) string
ReturnInfoListDeclString returns declative string for the given return info list
Types ¶
type FieldDeclInfo ¶
unify AST field list with simplified struct. Original thought was to give an common interface for syntax-based and type-based implementations
func ParamListDeclInfo ¶
func ParamListDeclInfo(fset *token.FileSet, fl *ast.FieldList) []*FieldDeclInfo