update asset

Former-commit-id: 633cedae9b7858796015bf74cac28ddd15312597 [formerly 633cedae9b7858796015bf74cac28ddd15312597 [formerly 76f0a4dc6e0ceb9f83164eef2508d3e0c4f77e55 [formerly 8c4a29fd08]]]
Former-commit-id: ed90f83153f4cbd9387627c90092747b824f767a
Former-commit-id: 31a3047b19e140e866c3b125543f54ff13c40855 [formerly 22c74457f2df4e63e3811b0b1b22f06de9cc3aa2]
Former-commit-id: 2b9d3f7cb4543f2cab2dedb1c0aa616c8394ff02
pull/15/head
Miguel Mota 6 years ago
parent e3466404a1
commit dab42519f7

@ -1 +1 @@
25df6680c43decb4b0c347ee171f02f8c498725e
6e9487c3af66a8004e286b72d88983e1a690e5e2

@ -4,6 +4,7 @@ import (
"fmt"
humanize "github.com/dustin/go-humanize"
"github.com/miguelmota/cointop/pkg/color"
"github.com/miguelmota/cointop/pkg/pad"
)
@ -13,6 +14,6 @@ func (ct *Cointop) updateMarket() error {
if err != nil {
return err
}
fmt.Fprintln(ct.marketview, pad.Right(fmt.Sprintf("%10.stotal market cap: %s", "", humanize.Commaf(market.TotalMarketCapUSD)), maxX, " "))
fmt.Fprintln(ct.marketview, pad.Right(fmt.Sprintf("%s Total Market Cap: %s • 24H Volume: %s • BTC Dominance: %.2f%% • Active Currencies: %s • Active Assets: %s • Active Markets: %s", color.Cyan("cointop"), color.WhiteBold(humanize.Commaf(market.TotalMarketCapUSD)), humanize.Commaf(market.Total24HVolumeUSD), market.BitcoinPercentageOfMarketCap, humanize.Comma(int64(market.ActiveCurrencies)), humanize.Comma(int64(market.ActiveAssets)), humanize.Comma(int64(market.ActiveMarkets))), maxX, " "))
return nil
}

@ -5,6 +5,8 @@ import "github.com/fatih/color"
var (
// White color
White = color.New(color.FgWhite).SprintFunc()
// WhiteBold bold
WhiteBold = color.New(color.FgWhite & color.Bold).SprintFunc()
// Green color
Green = color.New(color.FgGreen).SprintFunc()
// Red color

Loading…
Cancel
Save