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 expect a + in front of every number if f.plus is specified (compatible with c printf).
Except i am unsure how and if f.plus and f.space should be applied to %U.
I will work on a patch and test cases to correct this.
The text was updated successfully, but these errors were encountered:
"% +v" seems also special. the f.space is applied to numbers but f.plus (due to being used for struct names) is not applied to number. Since it says %v prints in default format maybe f.space should not do anything here.
Do not replace the sign in front of a number with a space if both
f.space and f.plus are both specified for number formatting.
This was already the case for integers but not for floats
and complex numbers.
Updates: #14543.
Change-Id: I07ddeb505003db84a8a7d2c743dc19fc427a00bd
Reviewed-on: https://go-review.googlesource.com/19974
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
This problem exists at least in current, go1.6, go1.4:
"% +verb" is inconsistently handled between different verbs.
http://play.golang.org/p/K7z4LPRrop
outputs:
I would expect a + in front of every number if f.plus is specified (compatible with c printf).
Except i am unsure how and if f.plus and f.space should be applied to %U.
I will work on a patch and test cases to correct this.
The text was updated successfully, but these errors were encountered: