Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd thousands separators to numbers by default #52
Comments
|
I thought this request sounded familiar, and yep XAMPPRocky/tokei#256 also in tokei. There might be some complexity when dealing with larger projects as if the value is too large it would overflow, but at least could fall back to the existing logic. The big catch with it is that it should account for regions https://en.wikipedia.org/wiki/Decimal_separator#Examples_of_use as different countries determine this differently. I had a quick look and I belive it should be possible to do using https://godoc.org/golang.org/x/text/message and https://godoc.org/golang.org/x/text/language If implemented I belive this should probably not be on by default, but provide a -h flag similar to how |
I would hope the same, and thus would think that it would be fine to turn this on by default, but you know how backwards compatibility goes, so the decision is up to you. |
Since the default output is meant to be human-readable, would it make sense to add thousands separators to make the output more easily readable?