Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to convert decimal to million or billion formats? #104

Open
rilysh opened this issue Sep 2, 2022 · 1 comment
Open

How to convert decimal to million or billion formats? #104

rilysh opened this issue Sep 2, 2022 · 1 comment

Comments

@rilysh
Copy link

rilysh commented Sep 2, 2022

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?

@dustin
Copy link
Owner

dustin commented Sep 2, 2022

That looks like https://pkg.go.dev/github.com/dustin/go-humanize#SI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants