graph

package
v0.7.0-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: MPL-2.0 Imports: 5 Imported by: 3 modules, 54 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSkipLine = errors.New("ReadTree: skip line")
	Root        = struct{}{}
)

Functions

func Flatten

func Flatten(pkgMap interface{}, root Tree, flatten FlattenFunc)

func Unwrap

func Unwrap(imports interface{}, graph interface{}, result Rooted) error

See https://jimmyfrasche.github.io/go-reflection-codex/

Types

type Deps

type Deps map[pkg.ID]pkg.Package

type FlattenFunc

type FlattenFunc func(node interface{}) (key interface{}, value interface{})

type Graph

type Graph map[interface{}][]interface{}

type LineParser

type LineParser func(line string) (level int, node interface{}, err error)

type Rooted

type Rooted struct {
	Imports []interface{}
	Graph   Graph
}

func ReadTree

func ReadTree(lines string, parser LineParser) (Rooted, error)

type Tree

type Tree interface {
	Children() []Tree
}

Jump to

Keyboard shortcuts

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