GetNextLeaf returns the next leaf in the graph from node start
(start *Node)
| 110 | |
| 111 | // GetNextLeaf returns the next leaf in the graph from node start |
| 112 | func (g *Graph) GetNextLeaf(start *Node) *Node { |
| 113 | if len(start.Childs) == 0 { |
| 114 | return start |
| 115 | } |
| 116 | |
| 117 | return g.GetNextLeaf(start.Childs[0]) |
| 118 | } |
| 119 | |
| 120 | // CyclicError is the type that is returned if a cyclic edge would be inserted |
| 121 | type CyclicError struct { |
no outgoing calls