graph

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

type Edge struct {
	From string
	To   string
}

type Graph

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

func New

func New(gomod, root string, maxGoroutines uint) (*Graph, error)

New creates a new graph of dependencies starting from the root directory. maxGoroutines is the maximum number of goroutines to use for parsing in parallel.

func (*Graph) Edges

func (g *Graph) Edges() []Edge

func (*Graph) Nodes

func (g *Graph) Nodes() []Node

type Node

type Node struct {
	ImportPath string
	Name       string
	PkgType    PkgTypeEnum
}

type PkgTypeEnum

type PkgTypeEnum string
const (
	PkgTypeStdLib PkgTypeEnum = "std"
	PkgTypeExtLib PkgTypeEnum = "ext"
	PkgTypeLocal  PkgTypeEnum = "loc"
	PkgTypeErr    PkgTypeEnum = "err"
)

Jump to

Keyboard shortcuts

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