howeyc further reduced
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user