1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-11 16:22:26 +08:00

doc: add example and update doc for formatter package

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

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
}