prints bal
cicd / ci (push) Successful in 2m1s
Details
cicd / ci (push) Successful in 2m1s
Details
parent
d1b3da3fa3
commit
8ab5a0edf5
|
|
@ -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
|
||||
}
|
||||
|
||||
panic(balances.Debug())
|
||||
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)
|
||||
}
|
||||
}
|
||||
case "reg":
|
||||
// register := deltas.Register()
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in New Issue