package graph
Import Path
go.uber.org/dig/internal/graph (on go.dev)
Dependency Relation
imports 0 packages, and imported by one package
Involved Source Files
graph.go
Package-Level Type Names (only one)
Graph represents a simple interface for representation
of a directed graph.
It is assumed that each node in the graph is uniquely
identified with an incremental positive integer (i.e. 1, 2, 3...).
A value of 0 for a node represents a sentinel error value.
EdgesFrom returns a list of integers that each
represents a node that has an edge from node u.
Order returns the total number of nodes in the graph
func IsAcyclic(g Graph) (bool, []int)
Package-Level Functions (only one)
IsAcyclic uses depth-first search to find cycles
in a generic graph represented by Graph interface.
If a cycle is found, it returns a list of nodes that
are in the cyclic path, identified by their orders.
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |