Source File
traversal.go
Belonging Package
github.com/pancsta/d2/d2layouts/d2talalayout/internal/trees
package treesimport// Descendants returns tree descendants in the breadth-first order used when// restored tree nodes and edges are copied back into an owning graph.func ( *layoutgraph.Tree) []*layoutgraph.Tree {if == nil {return nil}:= make([]*layoutgraph.Tree, 0):= []*layoutgraph.Tree{}for len() > 0 {:= [0]= [1:]for , := range .Children {= append(, )= append(, )}}return}
![]() |
The pages are generated with Golds v0.8.7. (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. |