pkg_graph

package
v0.0.0-...-7f0188e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallCounter

type CallCounter struct {
	CallStats CallStats
}

func NewCallCounter

func NewCallCounter(stats CallStats) *CallCounter

func (*CallCounter) Visit

func (v *CallCounter) Visit(node ast.Node) (w ast.Visitor)

type CallStats

type CallStats map[PkgName]map[FuncName]int

type Filter

type Filter struct {
	// contains filtered or unexported fields
}

func NewFilter

func NewFilter(includeStdLib bool, permit *regexp.Regexp, deny *regexp.Regexp) *Filter

type FuncName

type FuncName string

type PkgGraph

type PkgGraph struct {
	PkgInfos map[*types.Package]*loader.PackageInfo
	Nodes    map[string]*PkgNode
	Filter   *Filter
}

func NewPkgGraph

func NewPkgGraph(filter *Filter, allPkgs map[*types.Package]*loader.PackageInfo) *PkgGraph

func (*PkgGraph) CalcCallStats

func (g *PkgGraph) CalcCallStats()

func (*PkgGraph) Populate

func (p *PkgGraph) Populate(n *PkgNode)

func (*PkgGraph) Size

func (g *PkgGraph) Size() int

func (*PkgGraph) TotalFuncDecls

func (g *PkgGraph) TotalFuncDecls() int

type PkgName

type PkgName string

type PkgNode

type PkgNode struct {
	Node      *types.Package
	Parents   []*PkgNode
	Children  []*PkgNode
	Files     []*ast.File
	CallStats CallStats
}

func NewPkgNode

func NewPkgNode(root *types.Package, files []*ast.File) *PkgNode

func (*PkgNode) CalcCallStats

func (n *PkgNode) CalcCallStats()

func (*PkgNode) CallStatsEdge

func (n *PkgNode) CallStatsEdge(pkg PkgName) int

func (*PkgNode) FullName

func (n *PkgNode) FullName() string

func (*PkgNode) ShortName

func (n *PkgNode) ShortName() string

func (*PkgNode) TotalFuncDecls

func (n *PkgNode) TotalFuncDecls() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL