graphtree

package
v0.0.0-...-17f957d Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeGraph

func MakeGraph(tree *PkgNode, opts GraphvizOpts) *dot.Graph

Types

type Builder

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

func NewBuilder

func NewBuilder(opts Opts) *Builder

func (*Builder) GetPackages

func (b *Builder) GetPackages() map[string]*build.Package

func (*Builder) GetTree

func (b *Builder) GetTree() *PkgNode

func (*Builder) ProcessPackage

func (b *Builder) ProcessPackage(
	root string, pkgName string, level int, importedBy string, stopOnError bool,
) error

type GraphvizOpts

type GraphvizOpts struct {
	Horizontal bool
	NoEdges    bool
}

type NodesByName

type NodesByName map[string]dot.Node

type Opts

type Opts struct {
	WithTests       bool
	OnlyPrefixes    []string
	IgnoreVendor    bool
	IgnoreStdlib    bool
	MaxLevel        int
	BuildContext    build.Context
	WithGoRoot      bool
	Ignored         map[string]bool
	IgnoredPrefixes []string
}

type PkgNode

type PkgNode struct {
	Name     string
	Imports  []string
	Children map[string]*PkgNode // segment => child node
	Size     int
}

func (*PkgNode) GetChild

func (n *PkgNode) GetChild(path []string) *PkgNode

func (*PkgNode) Print

func (n *PkgNode) Print()

Jump to

Keyboard shortcuts

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