Skip to content

Commit

Permalink
small lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
howeyc committed Apr 20, 2019
1 parent 96af6de commit 14756a0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion cmd/lweb/handler_portfolio.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions cmd/lweb/handler_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions ledgerReader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import (
"testing"
)

var testDir string

func TestLedgerScannerBasic(t *testing.T) {
r, err := NewLedgerReader("testdata/ledgerReader_input_0")
if err != nil {
Expand Down

0 comments on commit 14756a0

Please sign in to comment.