Go · Golang

Go byte units and localized formatting


This article will go through creating byte unit methods for both metric and binary prefixes. The two stringers will take a float64 value and round it with a metric unit. Decimal(15000).String() would return 15.0 kBBinary(15000).String() would return 14.6 KiB Unlike many other byte converters, this will also format the number using international digit separators. While… Continue reading Go byte units and localized formatting