From aaa76347ba37d20b661657283198a3ef2b2c4899 Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Fri, 27 Oct 2023 19:53:31 -0600 Subject: [PATCH] instead of autocontribution, implement and default to contributions of 2500 per month with 3% APY, 22500 401k per year --- cmd/clitest/index.html | 2 +- cmd/clitest/main.go | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/clitest/index.html b/cmd/clitest/index.html index ca28172..52af3c9 100644 --- a/cmd/clitest/index.html +++ b/cmd/clitest/index.html @@ -65,7 +65,7 @@ - + diff --git a/cmd/clitest/main.go b/cmd/clitest/main.go index eba3699..614e92e 100644 --- a/cmd/clitest/main.go +++ b/cmd/clitest/main.go @@ -115,6 +115,14 @@ func main() { prediction = append(prediction, ana.NewInterestPredictor(fields[0], fields[1], apy)) case "autoContributions": prediction = append(prediction, ana.NewAutoContributionPredictor(register)) + case "contributions": + name := fields[0] + currency := ledger.Currency(fields[1]) + value, err := strconv.ParseFloat(fields[2], 64) + if err != nil { + panic(err) + } + prediction = append(prediction, ana.NewContributionPredictor(ledger.Balances{name: ledger.Balance{currency: value}})) default: panic(k) }