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
I would have expected the length of the output of %#6x and %#06x to be the same, namely 6 characters/runes as the width flag suggests.
A few places in the standard library use e.g. %#08x instead of %#.8x.
There are 37 places outside of fmt_test.go for grep "%#0.*x" of which 19 seem to be error message formatting.
The fmt_test.go tests that fail were added to check overflow of the internal buffer.
Interestingly besides these only the decode test that uses %#08x in https://github.com/golang/arch/blob/master/arm/armasm/gnu.go#L70 seems to fail if i change the behavior of the 0 padding to be the same as the space padding. ( only a small change in the integer function of fmt when f.sharp is set )
Is it to late to make them behave the same with padding as to much code may already rely on this? Then maybe the documentation should note this deviation from normal padding behavior instead.
( Maybe this is something for go vet. when %#0Lx is used it was maybe intended to be %#.Lx .)
The text was updated successfully, but these errors were encountered:
go1.4 go1.6 (see playground)
http://play.golang.org/p/C8nFpvFtCa
Output
I would have expected the length of the output of %#6x and %#06x to be the same, namely 6 characters/runes as the width flag suggests.
A few places in the standard library use e.g. %#08x instead of %#.8x.
There are 37 places outside of fmt_test.go for grep "%#0.*x" of which 19 seem to be error message formatting.
The fmt_test.go tests that fail were added to check overflow of the internal buffer.
Interestingly besides these only the decode test that uses %#08x in https://github.com/golang/arch/blob/master/arm/armasm/gnu.go#L70 seems to fail if i change the behavior of the 0 padding to be the same as the space padding. ( only a small change in the integer function of fmt when f.sharp is set )
Is it to late to make them behave the same with padding as to much code may already rely on this? Then maybe the documentation should note this deviation from normal padding behavior instead.
( Maybe this is something for go vet. when %#0Lx is used it was maybe intended to be %#.Lx .)
The text was updated successfully, but these errors were encountered: