parent
273aded7ff
commit
dcd4f08b0c
6
main.go
6
main.go
|
@ -96,10 +96,10 @@ func formatFeat(feat data, d Data, short bool) string {
|
||||||
|
|
||||||
var p []string
|
var p []string
|
||||||
if feat.UsagePercY > 0 {
|
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 {
|
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, " ")
|
percentages := strings.Join(p, " ")
|
||||||
out.WriteString(" " + percentages)
|
out.WriteString(" " + percentages)
|
||||||
|
@ -148,7 +148,7 @@ func formatFeat(feat data, d Data, short bool) string {
|
||||||
if _, ok := needNote[n]; !ok {
|
if _, ok := needNote[n]; !ok {
|
||||||
continue
|
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 != "" {
|
if feat.Notes != "" {
|
||||||
out.WriteString(fmt.Sprintf("\t %s %s", resultmap["i"], replaceNoteRe.ReplaceAllString(feat.Notes, " ")))
|
out.WriteString(fmt.Sprintf("\t %s %s", resultmap["i"], replaceNoteRe.ReplaceAllString(feat.Notes, " ")))
|
||||||
|
|
Loading…
Reference in New Issue