From 959035e8b2ae3292a70748aacffa0c795c53c48b Mon Sep 17 00:00:00 2001 From: Asara Date: Mon, 4 Jul 2022 22:00:44 -0400 Subject: [PATCH] Add some percision --- coingecko/coingecko.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/coingecko/coingecko.go b/coingecko/coingecko.go index 3d04083..0ed80b2 100644 --- a/coingecko/coingecko.go +++ b/coingecko/coingecko.go @@ -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) }