depmap

package
v0.0.0-...-472ff39 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackFn

type CallbackFn func(string)

type Depmap

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

func NewDepmap

func NewDepmap() Depmap

func (*Depmap) AddDeps

func (d *Depmap) AddDeps(key string, deps []string)

func (*Depmap) GetAllDeps

func (d *Depmap) GetAllDeps(key string) (out []string)

Returns all deps, including transitive ones. Uses a very simple depth first approach, ignore circular dependencies these should be handled separately.

func (*Depmap) GetDeps

func (d *Depmap) GetDeps(key string) []string

func (*Depmap) SetDeps

func (d *Depmap) SetDeps(key string, deps []string)

func (*Depmap) Traverse

func (d *Depmap) Traverse(key string, visit CallbackFn, loop CallbackFn)

Traverses the dependancies, detects loops.

Jump to

Keyboard shortcuts

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