Documentation ¶
Index ¶
- func Deref(tpe types.Type) types.Type
- func GetIdentChainOfCallFunc(expr ast.Expr) (list []*ast.Ident)
- func GetPkgImportPathAndExpose(s string) (string, string)
- func ImportGoPath(importPath string) string
- func StringifyCommentGroup(commentGroupList ...*ast.CommentGroup) (comments string)
- func StringifyNode(fset *token.FileSet, node ast.Node) string
- type CommentScanner
- type Package
- func (prog *Package) CommentsOf(node ast.Node) string
- func (p *Package) Const(name string) *types.Const
- func (prog *Package) Eval(expr ast.Expr) (types.TypeAndValue, error)
- func (prog *Package) FileOf(poser Poser) *ast.File
- func (p *Package) Func(name string) *types.Func
- func (prog *Package) FuncDeclOf(typeFunc *types.Func) (funcDecl *ast.FuncDecl)
- func (prog *Package) FuncResultsOf(typeFunc *types.Func) (Results, int)
- func (prog *Package) FuncResultsOfSignature(signature *types.Signature, funcBody *ast.BlockStmt, astFuncType *ast.FuncType) (Results, int)
- func (prog *Package) IdentOf(obj types.Object) *ast.Ident
- func (prog *Package) Pkg(importPath string) *packages.Package
- func (prog *Package) PkgInfoOf(poser Poser) *types.Info
- func (prog *Package) PkgOf(poser Poser) *types.Package
- func (p *Package) TypeName(name string) *types.TypeName
- func (p *Package) Var(name string) *types.Var
- type Poser
- type Results
- type TypeAndValueWithExpr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImportGoPath ¶
func StringifyCommentGroup ¶
func StringifyCommentGroup(commentGroupList ...*ast.CommentGroup) (comments string)
Types ¶
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
type Package ¶
func NewPackage ¶
func (*Package) FuncDeclOf ¶
func (*Package) FuncResultsOf ¶
func (*Package) FuncResultsOfSignature ¶
type Results ¶
type Results map[int][]TypeAndValueWithExpr
type TypeAndValueWithExpr ¶
type TypeAndValueWithExpr struct { Expr ast.Expr types.TypeAndValue }
Click to show internal directories.
Click to hide internal directories.