From 1acbf0ed301a739df949ac538235febdf0ddbcf8 Mon Sep 17 00:00:00 2001 From: Miguel Mota Date: Wed, 9 May 2018 02:14:50 -0700 Subject: [PATCH] fixes #9 --- cointop/table.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cointop/table.go b/cointop/table.go index 72775a3..8ae38eb 100644 --- a/cointop/table.go +++ b/cointop/table.go @@ -9,6 +9,7 @@ import ( "github.com/miguelmota/cointop/pkg/color" "github.com/miguelmota/cointop/pkg/humanize" + "github.com/miguelmota/cointop/pkg/pad" "github.com/miguelmota/cointop/pkg/table" ) @@ -69,8 +70,8 @@ func (ct *Cointop) refreshTable() error { } ct.table.AddRow( rank, - namecolor(fmt.Sprintf("%.22s", name)), - color.White(fmt.Sprintf("%.6s", coin.Symbol)), + namecolor(pad.Right(fmt.Sprintf("%.22s", name), 21, " ")), + color.White(pad.Right(fmt.Sprintf("%.6s", coin.Symbol), 5, " ")), colorprice(fmt.Sprintf("%12s", humanize.Commaf(coin.Price))), color.White(fmt.Sprintf("%17s", humanize.Commaf(coin.MarketCap))), color.White(fmt.Sprintf("%15s", humanize.Commaf(coin.Volume24H))),