You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Did a little deep diving and found this in the source code.
// Two ways to ask for extra leading zero digits: %.3d or %03d.
// If both are specified the f.zero flag is ignored and
// padding with spaces is used instead.
This seems a little obsolete since the code below is modified, but the gist from the code is that when you use a precision value, only space padding is done. Happy to submit a patch if this isn't intended behavior
I read fmt docs several times, but didn't find any reasoning why the following would ever happen.
So here is normal working behavior:
Output (ok):
Now, we add one additional dot
.
making precision equal to zero, and we'll see spaces instead of zeroes as it should be with0
flag:Output (wrong):
System details
The text was updated successfully, but these errors were encountered: