go-humanize
go-humanize copied to clipboard
How to convert decimal to million or billion formats?
I want to convert decimal numbers like 1000 to 1k, 10000 to 10k, and 100000 to 100k and so on. But I'm a little confused, how to do it? Is there any function available or implemented yet about this theory?
That looks like https://pkg.go.dev/github.com/dustin/go-humanize#SI