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 (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"slices"
|
"slices"
|
||||||
|
|
||||||
|
|
@ -46,6 +47,10 @@ func Main() {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if period := config.Query.Period; period != "" {
|
||||||
|
panic(period)
|
||||||
|
}
|
||||||
|
|
||||||
if depth := config.Query.Depth; depth > 0 {
|
if depth := config.Query.Depth; depth > 0 {
|
||||||
panic(depth)
|
panic(depth)
|
||||||
}
|
}
|
||||||
|
|
@ -60,26 +65,22 @@ func Main() {
|
||||||
}
|
}
|
||||||
slices.Sort(keys)
|
slices.Sort(keys)
|
||||||
|
|
||||||
depth := 0
|
max := 0
|
||||||
previous := ""
|
for _, k := range keys {
|
||||||
for i := range keys {
|
if n := len(k); n > max {
|
||||||
key := keys[i]
|
max = n
|
||||||
|
|
||||||
if isSameDepth := func() bool {
|
|
||||||
return false
|
|
||||||
}(); isSameDepth {
|
|
||||||
} else if isDeeper := func() bool {
|
|
||||||
return false
|
|
||||||
}(); isDeeper {
|
|
||||||
} else if lessDeep := func() int {
|
|
||||||
return 0
|
|
||||||
}(); true {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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":
|
case "reg":
|
||||||
// register := deltas.Register()
|
// register := deltas.Register()
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue