ticker
ticker copied to clipboard
Adding thousands separators
The current version shows longs numbers in a non human readable notation where long numbers are presented without thousands separators.
7453823
vs
7,453,823
A quick solution and easy solution is available - just format the printed numbers with an available library of your choice.
And how to do this in Windows?
WDYM? The same solution would work for any OS
"A quick solution and easy solution is available - just format the printed numbers with an available library of your choice."
I can't find that solution you are claiming that exists!
Happy New Year!
https://stackoverflow.com/questions/13020308/how-to-fmt-printf-an-integer-with-thousands-comma/46811454 This stackoverflow post is full of examples. I would recommend using https://github.com/dustin/go-humanize
Thanks for the suggestion! I've seen this request a few times so I'll add it to the roadmap.
go-humanize or something similar along with commas will likely be needed to compensate for the additional characters.
I would be willing to try to tackle this problem if you are looking for some help.
Please make the separator character user configurable. Remember that different cultures have different ways of doing this.
Adding this shouldn't be too difficult but the wrinkle is that each value would take up more room due to the commas so there should be some testing done around the edge cases there + how this interacts with the scale suffix. The problem is also partially addressed by the scale suffix
@yodigi7 a PR would be welcome if you're interested in having a look.
@clauseggers agreed this should be configurable