MCPcopy Index your code
hub / github.com/devspace-sh/devspace / findFirstPath

Function findFirstPath

pkg/devspace/dependency/graph/graph.go:175–185  ·  view source on GitHub ↗

find first path from node to node with DFS

(from *Node, to *Node)

Source from the content-addressed store, hash-verified

173
174// find first path from node to node with DFS
175func findFirstPath(from *Node, to *Node) []*Node {
176 isVisited := map[string]bool{}
177 pathList := []*Node{from}
178
179 // Call recursive utility
180 if findFirstPathRecursive(from, to, isVisited, &pathList) {
181 return pathList
182 }
183
184 return nil
185}
186
187// A recursive function to print
188// all paths from 'u' to 'd'.

Callers 2

TestGraphFunction · 0.85
AddEdgeMethod · 0.85

Calls 1

findFirstPathRecursiveFunction · 0.85

Tested by 1

TestGraphFunction · 0.68