update asset

pull/5/head
Miguel Mota 6 years ago
parent 55d366aeae
commit 8c4a29fd08

Binary file not shown.

Before

Width:  |  Height:  |  Size: 557 KiB

After

Width:  |  Height:  |  Size: 678 KiB

@ -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