prediction tests a go

This commit is contained in:
bel
2023-10-27 07:52:48 -06:00
parent 5c26410b0f
commit 1e9962d996
2 changed files with 63 additions and 3 deletions

View File

@@ -100,3 +100,19 @@ func dateToTime(s string) (time.Time, error) {
}
return time.Time{}, fmt.Errorf("no layout matching %q", s)
}
func (register Register) Debug() string {
result := "{"
for _, date := range register.Dates() {
result += "{" + date
for name, balance := range register[date] {
result += "{" + name
for cur, v := range balance {
result += fmt.Sprintf("%s=%.2f ", cur, v)
}
result += "}"
}
result += "}"
}
return result + "}"
}