prediction tests a go
This commit is contained in:
@@ -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 + "}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user