This commit is contained in:
parent
eb56e5c923
commit
e655ccfd40
1 changed files with 3 additions and 6 deletions
|
@ -1,8 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
zordTree "g.arns.lt/zordsdavini/zord-tree"
|
||||
"strings"
|
||||
|
||||
zordTree "g.arns.lt/zordsdavini/zord-tree"
|
||||
)
|
||||
|
||||
func FormatTreeSummery(tree zordTree.Tree) Tree {
|
||||
|
@ -24,11 +25,7 @@ func readTree(tree zordTree.Tree, ts *Tree, isRoot bool) {
|
|||
if ts.Categories == nil {
|
||||
ts.Categories = make(map[string]int32)
|
||||
}
|
||||
if _, ok := ts.Categories[category]; ok {
|
||||
ts.Categories[category]++
|
||||
} else {
|
||||
ts.Categories[category] = 1
|
||||
}
|
||||
ts.Categories[category] = int32(len(subtree.Files))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue