fmt: fix some gofmt issue

This commit is contained in:
dudaodong committed 2021-11-29 13:01:46 +08:00
1 parent 4848647918
commit 0c4b512084
14 files changed
+46 -44

No files matched your search

+13 -12
View File
@@ -1,25 +1,26 @@
package formatter
import (
"github.com/duke-git/lancet/utils"
"testing"
"github.com/duke-git/lancet/utils"
)
func TestComma(t *testing.T) {
comma(t, "", "","")
comma(t, "aa", "","")
comma(t, "123", "","123")
comma(t, "12345", "","12,345")
comma(t, 12345, "","12,345")
comma(t, 12345, "$","$12,345")
comma(t, 12345, "¥","¥12,345")
comma(t, 12345.6789, "","12,345.6789")
comma(t, "", "", "")
comma(t, "aa", "", "")
comma(t, "123", "", "123")
comma(t, "12345", "", "12,345")
comma(t, 12345, "", "12,345")
comma(t, 12345, "$", "$12,345")
comma(t, 12345, "¥", "¥12,345")
comma(t, 12345.6789, "", "12,345.6789")
}
func comma(t *testing.T, test interface{}, symbol string, expected interface{}) {
res:= Comma(test, symbol)
func comma(t *testing.T, test interface{}, symbol string, expected interface{}) {
res := Comma(test, symbol)
if res != expected {
utils.LogFailedTestInfo(t, "Comma", test, expected, res)
t.FailNow()
}
}
}