Documentation
¶
Index ¶
- func GetFuncOrMethodName(fn *ast.FuncDecl) string
- func GetNodeId(pkg *packages.Package, node ast.Node) string
- func GetObjectID(pkg string, fileName string, obj string) string
- func LoadPackages(repo string) ([]*packages.Package, error)
- func NewProject(root string) (*project, error)
- type DependencyInfo
- type GoModuleInfo
- type Graph
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFuncOrMethodName ¶ added in v1.0.0
GetFuncOrMethodName 获取函数或方法的名称
func GetObjectID ¶ added in v1.0.0
GetObjectID 获取完整标识符路径,格式:包名/文件名:标识符 pkg应为包括go module name的完整包名,例如:github.com/bootun/veronica/parser
Types ¶
type DependencyInfo ¶ added in v1.0.0
type DependencyInfo struct {
// contains filtered or unexported fields
}
func BuildDependency ¶ added in v1.0.0
func BuildDependency(pkgs []*packages.Package) (*DependencyInfo, error)
BuildDependency 构建依赖关系图
func (*DependencyInfo) GetDependency ¶ added in v1.0.0
func (d *DependencyInfo) GetDependency(targetID string) ([]string, error)
GetDependency 获取 targetID 的依赖节点
type GoModuleInfo ¶
Go mod 信息
func ParseGoModuleInfo ¶
func ParseGoModuleInfo(path string) (*GoModuleInfo, error)
ParseGoModuleInfo parse go.mod and return GoModuleInfo
Click to show internal directories.
Click to hide internal directories.