Documentation ¶
Index ¶
- func CommentsOf(fileSet *token.FileSet, targetNode ast.Node, files ...*ast.File) string
- func FileOf(targetNode ast.Node, files ...*ast.File) *ast.File
- func ForEachFuncResult(program *loader.Program, typeFunc *types.Func, ...)
- func FuncDeclOf(ident *ast.Ident, file *ast.File) (funcDecl *ast.FuncDecl)
- func FuncDeclOfTypeFunc(pkgInfo *loader.PackageInfo, typeFunc *types.Func) *ast.FuncDecl
- func GetIdentChainCallOfCallFun(expr ast.Expr) (list []*ast.Ident)
- func GetPkgImportPathAndExpose(s string) (pkgImportPath string, expose string)
- func IndirectType(tpe types.Type) types.Type
- func MethodOf(named *types.Named, funcName string) (typeFunc *types.Func)
- func MustEvalExpr(fileSet *token.FileSet, pkg *types.Package, expr ast.Expr) types.TypeAndValue
- func NewTestProgram(content string) (pkgImportPath string, program *loader.Program)
- func ResolvePkgImport(pkgImportPath string) string
- func StringifyAst(fset *token.FileSet, node ast.Node) string
- func StringifyCommentGroup(commentGroupList ...*ast.CommentGroup) (comments string)
- type ByCommentPos
- type CommentScanner
- type Query
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommentsOf ¶
func ForEachFuncResult ¶
func FuncDeclOfTypeFunc ¶
func MustEvalExpr ¶
func NewTestProgram ¶
func ResolvePkgImport ¶
func StringifyCommentGroup ¶
func StringifyCommentGroup(commentGroupList ...*ast.CommentGroup) (comments string)
Types ¶
type ByCommentPos ¶
type ByCommentPos []*ast.CommentGroup
func (ByCommentPos) Len ¶
func (a ByCommentPos) Len() int
func (ByCommentPos) Less ¶
func (a ByCommentPos) Less(i, j int) bool
func (ByCommentPos) Swap ¶
func (a ByCommentPos) Swap(i, j int)
type CommentScanner ¶
type CommentScanner struct { CommentMap ast.CommentMap // contains filtered or unexported fields }
func NewCommentScanner ¶
func NewCommentScanner(fileSet *token.FileSet, file *ast.File) *CommentScanner
func (*CommentScanner) CommentGroupListOf ¶
func (scanner *CommentScanner) CommentGroupListOf(targetNode ast.Node) (commentGroupList []*ast.CommentGroup)
func (*CommentScanner) CommentsOf ¶
func (scanner *CommentScanner) CommentsOf(targetNode ast.Node) string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.