len(t.tree.Entries) != the number of elements walked by treewalker for some reason because of empty directories, submodules, etc, so we have to walk here.
()
| 133 | // for some reason because of empty directories, submodules, etc, so we |
| 134 | // have to walk here. |
| 135 | func (t *treeNoder) NumChildren() (int, error) { |
| 136 | children, err := t.Children() |
| 137 | if err != nil { |
| 138 | return 0, err |
| 139 | } |
| 140 | |
| 141 | return len(children), nil |
| 142 | } |