howeyc further reduced

This commit is contained in:
Bel LaPointe
2023-10-23 11:01:51 -06:00
parent 7db1eff2b3
commit 703b7b632d
2 changed files with 3 additions and 12 deletions

View File

@@ -2,8 +2,6 @@ package ledger
import (
"time"
"github.com/howeyc/ledger"
)
type Currency string
@@ -19,15 +17,6 @@ type Delta struct {
Currency Currency
}
func newDeltas(t *ledger.Transaction) []Delta {
result := make([]Delta, len(t.AccountChanges))
for i, a := range t.AccountChanges {
value, _ := a.Balance.Float64()
result[i] = newDelta(t.Date, a.Name, value)
}
return result
}
func newDelta(d time.Time, a string, v float64) Delta {
return Delta{
Date: d,