byte count formatting issues

19 views
Skip to first unread message

Kolya Krece

unread,
Jan 3, 2017, 4:30:37 PM1/3/17
to skicka-users
In skicka.go a function fmtbytes is defined that formats size quantities via scaling. In the fixed format length section of the function a format string of %6.2f is used as a format for the scaled quantity. The problem is the scaling function can produce floating point numbers in excess of 999.99. As a result for quantities that scale above 999.99 are printed out with 7 digits instead of 6. (For example formatting a 1001 * 1024 * 1024 byte size quantity) This throws of the fixed column formatting since the rest of the formatted sizes will print out with 6 digits.
Reply all
Reply to author
Forward
0 new messages