Skip to content

Commit

Permalink
prevent number formatting potential errors
Browse files Browse the repository at this point in the history
- update codecov range
  • Loading branch information
Phillip Miller committed Mar 10, 2022
1 parent 0193cfc commit e281954
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/.codecov.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
coverage:
range: 40..65
range: 50..75
round: up
precision: 2
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,8 @@ func printTotalMarketCap(coinData *CoinData) error {
}

totalString := strconv.FormatFloat(total, 'E', -1, 64)
totalMarketCap, _ := prettyFloatString(totalString, false, true, false)
totalMarketCapFull, _ := prettyFloatString(totalString, false, false, false)
fmt.Printf("\nTotal Crypto Market Cap \u2248 $%s \u2248 $%s \n", totalMarketCap, totalMarketCapFull)
fmt.Printf("\nTotal Crypto Market Cap \u2248 $%s \n", totalMarketCapFull)
return nil
}

Expand Down

0 comments on commit e281954

Please sign in to comment.