func (g *Graph) DFS(edgeType string, rootNode Path, fn func(nodePath Node) bool) {
...
stack := driver.NewInMemStack()
...
stack.Range(func(element interface{}) bool {
....
}
stack.Range uses the pop function
But the output of breadth traversal starts from A.
So shouldn’t depth traversal also start from A?