pkgtree

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	Parent *Repo

	Mod   *packages.Module
	Local bool

	Pkgs map[string]*Package
	// contains filtered or unexported fields
}

func (*Module) NodePackage

func (m *Module) NodePackage(n *pkggraph.Node) *Package

func (*Module) Package

func (m *Module) Package() *Package

func (*Module) Path

func (m *Module) Path() string

func (*Module) Sort

func (m *Module) Sort()

func (*Module) VisitChildren

func (m *Module) VisitChildren(fn func(Node))

type Node

type Node interface {
	Path() string
	Package() *Package
	VisitChildren(func(Node))
}

type Package

type Package struct {
	Parent    Node
	GraphNode *pkggraph.Node
}

func (*Package) OnlyChild

func (p *Package) OnlyChild() bool

func (*Package) Package

func (p *Package) Package() *Package

func (*Package) Path

func (p *Package) Path() string

func (*Package) VisitChildren

func (p *Package) VisitChildren(_ func(Node))

type Repo

type Repo struct {
	Root *vcs.RepoRoot

	Modules map[string]*Module

	Pkgs map[string]*Package
	// contains filtered or unexported fields
}

func (*Repo) NodeModule

func (r *Repo) NodeModule(n *pkggraph.Node, goModCachePath string) *Module

func (*Repo) NodePackage

func (r *Repo) NodePackage(n *pkggraph.Node) *Package

func (*Repo) Package

func (r *Repo) Package() *Package

func (*Repo) Path

func (r *Repo) Path() string

func (*Repo) SameAsOnlyModule

func (r *Repo) SameAsOnlyModule() bool

func (*Repo) Sort

func (r *Repo) Sort()

func (*Repo) VisitChildren

func (r *Repo) VisitChildren(fn func(Node))

type Tree

type Tree struct {
	Repos map[string]*Repo
	// contains filtered or unexported fields
}

func From

func From(g *pkggraph.Graph) (*Tree, error)

func (*Tree) LookupTable

func (t *Tree) LookupTable() map[*pkggraph.Node]*Package

func (*Tree) NodeRepo

func (t *Tree) NodeRepo(n *pkggraph.Node) *Repo

func (*Tree) Package

func (t *Tree) Package() *Package

func (*Tree) Path

func (t *Tree) Path() string

func (*Tree) Sort

func (t *Tree) Sort()

func (*Tree) VisitChildren

func (t *Tree) VisitChildren(fn func(Node))

func (*Tree) Walk

func (t *Tree) Walk(fn func(Node))

Jump to

Keyboard shortcuts

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