From dcd4f08b0c25bee1bc2f0e55d48d020c1cf2ab28 Mon Sep 17 00:00:00 2001 From: jolheiser Date: Fri, 7 Oct 2022 21:48:44 -0500 Subject: [PATCH] clean up Signed-off-by: jolheiser --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 00ef086..fa614c0 100644 --- a/main.go +++ b/main.go @@ -96,10 +96,10 @@ func formatFeat(feat data, d Data, short bool) string { var p []string if feat.UsagePercY > 0 { - p = append(p, fmt.Sprintf("%s %s%%", resultmap["y"], color.GreenString("%f", feat.UsagePercY))) + p = append(p, fmt.Sprintf("%s %s%%", resultmap["y"], color.GreenString("%.2f", feat.UsagePercY))) } if feat.UsagePercA > 0 { - p = append(p, fmt.Sprintf("%s %s%%", resultmap["a"], color.YellowString("%f", feat.UsagePercA))) + p = append(p, fmt.Sprintf("%s %s%%", resultmap["a"], color.YellowString("%.2f", feat.UsagePercA))) } percentages := strings.Join(p, " ") out.WriteString(" " + percentages) @@ -148,7 +148,7 @@ func formatFeat(feat data, d Data, short bool) string { if _, ok := needNote[n]; !ok { continue } - out.WriteString(fmt.Sprintf("\t\t%s%s", color.YellowString(string(supernums[n])), note)) + out.WriteString(fmt.Sprintf("\t\t%s%s\n", color.YellowString(string(supernums[n])), note)) } if feat.Notes != "" { out.WriteString(fmt.Sprintf("\t %s %s", resultmap["i"], replaceNoteRe.ReplaceAllString(feat.Notes, " ")))