Replace RenderFloat with FormatFloat
I suppose it was previously named RenderFloat
diff --git a/number.go b/number.go
index 6470d0d..fc422af 100644
--- a/number.go
+++ b/number.go
@@ -46,7 +46,7 @@
// * decimal separator
// * decimal precision
//
-// Usage: s := RenderFloat(format, n)
+// Usage: s := FormatFloat(format, n)
// The format parameter tells how to render the number n.
//
// See examples: http://play.golang.org/p/LXc1Ddm1lJ
@@ -111,7 +111,7 @@
// +0000
if formatIndx[0] == 0 {
if format[formatIndx[0]] != '+' {
- panic("RenderFloat(): invalid positive sign directive")
+ panic("FormatFloat(): invalid positive sign directive")
}
positiveStr = "+"
formatIndx = formatIndx[1:]
@@ -125,7 +125,7 @@
// 000,000.00
if len(formatIndx) == 2 {
if (formatIndx[1] - formatIndx[0]) != 4 {
- panic("RenderFloat(): thousands separator directive must be followed by 3 digit-specifiers")
+ panic("FormatFloat(): thousands separator directive must be followed by 3 digit-specifiers")
}
thousandStr = string(format[formatIndx[0]])
formatIndx = formatIndx[1:]
diff --git a/number_test.go b/number_test.go
index 516f337..f4767c3 100644
--- a/number_test.go
+++ b/number_test.go
@@ -52,8 +52,8 @@
}
// Test the things that could panic
panictests := []TestStruct{
- {"RenderFloat(): invalid positive sign directive", "-", 12345.6789, "12,345.68"},
- {"RenderFloat(): thousands separator directive must be followed by 3 digit-specifiers", "0.01", 12345.6789, "12,345.68"},
+ {"FormatFloat(): invalid positive sign directive", "-", 12345.6789, "12,345.68"},
+ {"FormatFloat(): thousands separator directive must be followed by 3 digit-specifiers", "0.01", 12345.6789, "12,345.68"},
}
for _, test := range panictests {
didPanic := false