Documentation ¶
Overview ¶
Package goastpkg uses golang.org/x/tools/go/packages to load full ASTs for a package and its dependencies, then generates a *go/ast.Package for the requested package (and its dependencies).
This is particularly useful when one wants all Obj references resolved in indentifiers, both within a package (between files) and across packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Package ¶
type Package struct { Path string PkgAST *ast.Package Pkg *packages.Package // CommentMap per file in the package PkgCommentMaps map[*ast.File]ast.CommentMap // Deps and DepsAST are keyed by import path. DepsAST map[string]*ast.Package Deps map[string]*packages.Package }
Package contains the ast.Package and packages.Package pointers for a package and all its (transitive) dependencies.
Click to show internal directories.
Click to hide internal directories.