additions

This commit is contained in:
Will Charczuk 2019-09-09 20:21:51 -07:00
parent 602ff901f7
commit 6d57cf4533
3 changed files with 43 additions and 5 deletions

View file

@ -96,3 +96,10 @@ func FloatValueFormatterWithFormat(v interface{}, floatFormat string) string {
}
return ""
}
// KValueFormatter is a formatter for K values.
func KValueFormatter(k float64, vf ValueFormatter) ValueFormatter {
return func(v interface{}) string {
return fmt.Sprintf("%0.0fσ %s", k, vf(v))
}
}