commit | 8fe50e4ef72a15aa5e42e0ff0fd20a01e7119d4f | [log] [tgz] |
---|---|---|
author | Dustin Sallings <dustin@spy.net> | Mon Jul 07 21:37:21 2014 -0700 |
committer | Dustin Sallings <dustin@spy.net> | Mon Jul 07 21:37:21 2014 -0700 |
tree | 983082f0f7818c877ec6f3b130e41416f3979273 | |
parent | 12f1745e821f3d6e19227d5c83299b8c856fc70f [diff] |
Get rid of fmt from SI
diff --git a/si.go b/si.go index eb6eb57..a598206 100644 --- a/si.go +++ b/si.go
@@ -1,9 +1,6 @@ package humanize -import ( - "fmt" - "math" -) +import "math" var siPrefixTable = map[float64]string{ -24: "y", // yocto @@ -52,5 +49,5 @@ // e.g. SI(2.2345e-12, "F") -> 2.2345pF func SI(input float64, unit string) string { value, prefix := newSI(input) - return fmt.Sprintf("%s%s%s", Ftoa(value), prefix, unit) + return Ftoa(value) + prefix + unit }