cli depth doesnt require mindepth
All checks were successful
cicd / ci (push) Successful in 45s

This commit is contained in:
bel
2025-04-06 11:27:54 -06:00
parent fabd26e8e9
commit 1805a087e0

View File

@@ -70,11 +70,13 @@ func Main() {
pattern := ".*"
if depth := config.Query.Depth; depth > 0 {
patterns := []string{}
pattern = ""
for i := 0; i < depth; i++ {
pattern += "[^:]*:"
patterns = append([]string{strings.Trim(pattern, ":")}, patterns...)
}
pattern = strings.Trim(pattern, ":")
pattern = strings.Join(patterns, "|")
}
group := ledger.GroupName(pattern)