doc: add example and update doc for formatter package

This commit is contained in:
dudaodong committed 2023-01-02 15:35:09 +08:00
1 parent 6d57891f66
commit 64d5486cc6
5 files changed
+70 -49

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
package formatter
import "fmt"
func ExampleComma() {
result1 := Comma("123", "")
result2 := Comma("12345", "$")
result3 := Comma(1234567, "¥")
fmt.Println(result1)
fmt.Println(result2)
fmt.Println(result3)
// Output:
// 123
// $12,345
// ¥1,234,567
}