From dab42519f7ebfb6dd7b3d3a845b7e4336a8d139b Mon Sep 17 00:00:00 2001 From: Miguel Mota Date: Sat, 31 Mar 2018 03:49:23 -0700 Subject: [PATCH] update asset Former-commit-id: 633cedae9b7858796015bf74cac28ddd15312597 [formerly 633cedae9b7858796015bf74cac28ddd15312597 [formerly 76f0a4dc6e0ceb9f83164eef2508d3e0c4f77e55 [formerly 8c4a29fd0875d6dde3503c361c0c8b4c4000418b]]] Former-commit-id: ed90f83153f4cbd9387627c90092747b824f767a Former-commit-id: 31a3047b19e140e866c3b125543f54ff13c40855 [formerly 22c74457f2df4e63e3811b0b1b22f06de9cc3aa2] Former-commit-id: 2b9d3f7cb4543f2cab2dedb1c0aa616c8394ff02 --- assets/screenshot.gif.REMOVED.git-id | 2 +- cointop/market.go | 3 ++- pkg/color/color.go | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/assets/screenshot.gif.REMOVED.git-id b/assets/screenshot.gif.REMOVED.git-id index f1e14e0..222836a 100644 --- a/assets/screenshot.gif.REMOVED.git-id +++ b/assets/screenshot.gif.REMOVED.git-id @@ -1 +1 @@ -25df6680c43decb4b0c347ee171f02f8c498725e \ No newline at end of file +6e9487c3af66a8004e286b72d88983e1a690e5e2 \ No newline at end of file diff --git a/cointop/market.go b/cointop/market.go index 28c9ba9..58ad0f5 100644 --- a/cointop/market.go +++ b/cointop/market.go @@ -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 } diff --git a/pkg/color/color.go b/pkg/color/color.go index 5bcd35f..53bada6 100644 --- a/pkg/color/color.go +++ b/pkg/color/color.go @@ -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