code: func NewTreeWalker(t *Tree, recursive bool, seen map[plumbing.Hash]bool) *TreeWalker {
  	stack := make([]*treeEntryIter, 0, startingStackSize)
  	stack = append(stack, &treeEntryIter{t, 0})
  
  	return &TreeWalker{
  		stack:     stack,
  		recursive: recursive,
  		seen:      seen,
  
  		s: t.s,
  		t: t,
  	}
  }
docs: // NewTreeWalker returns a new TreeWalker for the given tree.
  //
  // It is the caller's responsibility to call Close() when finished with the
  // tree walker.