Add some percision
This commit is contained in:
parent
a996bff772
commit
959035e8b2
1 changed files with 5 additions and 5 deletions
|
@ -92,13 +92,13 @@ func getData(query []string) string {
|
|||
json.NewDecoder(resp.Body).Decode(&coin)
|
||||
c := coin[0]
|
||||
const output = `%s (%s)
|
||||
Current Price: $%f
|
||||
Current Price: $%.4f
|
||||
Market Ca: $%.0f
|
||||
24 Hour Volume: $%.0f
|
||||
24 Hour High: $%f
|
||||
24 Hour Low: $%f
|
||||
All Time High: $%f
|
||||
All Time Low: $%f`
|
||||
24 Hour High: $%.4f
|
||||
24 Hour Low: $%.4f
|
||||
All Time High: $%.4f
|
||||
All Time Low: $%.4f`
|
||||
return fmt.Sprintf(output, c.Id, c.Symbol, c.CurrentPrice, c.MarketCap, c.TotalVolume, c.High24, c.Low24, c.ATH, c.ATL)
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue