Created
February 24, 2022 13:28
-
-
Save vidhill/7f0ad8ccde6c18005e172428d0d49866 to your computer and use it in GitHub Desktop.
Go, print numbers with thousand separators
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"golang.org/x/text/language" | |
"golang.org/x/text/message" | |
) | |
// create a new printer withe the locale set to english | |
var print = message.NewPrinter(language.English) | |
func main() { | |
print.Printf("Num of docs: %d\n", 100000000) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment