diff --git a/cmd/lweb/handler_portfolio.go b/cmd/lweb/handler_portfolio.go index 9667884c..f2141308 100644 --- a/cmd/lweb/handler_portfolio.go +++ b/cmd/lweb/handler_portfolio.go @@ -120,7 +120,6 @@ func portfolioHandler(w http.ResponseWriter, r *http.Request, params martini.Par quote, qerr := stockQuote(symbol) if qerr == nil { sprice = quote.Last - sclose = quote.PreviousClose if quote.Close > 0 { sclose = quote.Close } else { diff --git a/cmd/lweb/handler_report.go b/cmd/lweb/handler_report.go index 8cd7dc5f..994e5e3f 100644 --- a/cmd/lweb/handler_report.go +++ b/cmd/lweb/handler_report.go @@ -107,7 +107,7 @@ func getAccounts(accountNeedle string, accountsHaystack []*ledger.Account) (resu } } // Remove any parents - for k, _ := range foundAccountNames { + for k := range foundAccountNames { kpre := k[:strings.LastIndex(k, ":")] if _, found := foundAccountNames[kpre]; found { delete(foundAccountNames, kpre) @@ -313,7 +313,7 @@ func reportHandler(w http.ResponseWriter, r *http.Request, params martini.Params sort.Slice(values, func(i, j int) bool { return values[i].Balance.Cmp(values[j].Balance) > 0 }) maxIdx := 0 - for idx, _ := range values { + for idx := range values { mf, _ := maxValue.Float64() cf, _ := values[idx].Balance.Float64() values[idx].Percentage = int((cf / mf) * 100.0) diff --git a/ledgerReader_test.go b/ledgerReader_test.go index 14a186a6..a3463e85 100644 --- a/ledgerReader_test.go +++ b/ledgerReader_test.go @@ -7,8 +7,6 @@ import ( "testing" ) -var testDir string - func TestLedgerScannerBasic(t *testing.T) { r, err := NewLedgerReader("testdata/ledgerReader_input_0") if err != nil {