prints bal
cicd / ci (push) Successful in 2m1s Details

main
Bel LaPointe 2024-12-12 21:37:02 -07:00
parent d1b3da3fa3
commit 8ab5a0edf5
1 changed files with 18 additions and 17 deletions

View File

@ -2,6 +2,7 @@ package cli
import (
"flag"
"fmt"
"os"
"slices"
@ -46,6 +47,10 @@ func Main() {
panic(err)
}
if period := config.Query.Period; period != "" {
panic(period)
}
if depth := config.Query.Depth; depth > 0 {
panic(depth)
}
@ -60,26 +65,22 @@ func Main() {
}
slices.Sort(keys)
depth := 0
previous := ""
for i := range keys {
key := keys[i]
if isSameDepth := func() bool {
return false
}(); isSameDepth {
} else if isDeeper := func() bool {
return false
}(); isDeeper {
} else if lessDeep := func() int {
return 0
}(); true {
max := 0
for _, k := range keys {
if n := len(k); n > max {
max = n
}
}
previous = key
format := fmt.Sprintf("%%-%ds\t%%s%%.2f\n", max)
for _, key := range keys {
for currency, v := range balances[key] {
if currency != "$" {
currency += " "
}
fmt.Printf(format, key, currency, v)
}
}
panic(balances.Debug())
case "reg":
// register := deltas.Register()
default: