Help us shape the future of Go! Take the 2026 Go Developer Survey

dag

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

type Graph struct {
	Nodes map[string]*Node
}

Graph represents the dependency graph

func BuildGraph

func BuildGraph(contentDir, partialsDir string) (*Graph, error)

BuildGraph builds the dependency graph for the given content directory

func NewGraph

func NewGraph() *Graph

NewGraph creates a new dependency graph

func (*Graph) AddEdge

func (g *Graph) AddEdge(from, to *Node)

AddEdge adds an edge to the graph

func (*Graph) AddNode

func (g *Graph) AddNode(path string) *Node

AddNode adds a node to the graph

func (*Graph) GetDependents

func (g *Graph) GetDependents(node *Node) []*Node

GetDependents returns the dependents of the given node

func (*Graph) String

func (g *Graph) String() string

String returns a string representation of the graph

type Node

type Node struct {
	Path         string
	Dependencies []*Node
}

Node represents a node in the dependency graph

Jump to

Keyboard shortcuts

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