aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/binary
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2015-06-27 11:07:30 +1000
committerRob Pike <r@golang.org>2015-06-29 07:17:23 +0000
commita76c1a5c7fb704e5658bbbe9f27b4301b86bfd80 (patch)
tree75dafa9908fb9caf752c1b27cb24ccda6502c985 /src/encoding/binary
parentc97e73d8497f61b61299e5d2d371ef672d0c596d (diff)
downloadgo-a76c1a5c7fb704e5658bbbe9f27b4301b86bfd80.tar.xz
fmt: restore padding for %x on byte slices and strings
Also improve the documentation. A prior fix in this release changed the properties for empty strings and slices, incorrectly. Previous behavior is now restored and better documented. Add lots of tests. The behavior is that when using a string-like format (%s %q %x %X) a byte slice is equivalent to a string, and printed as a unit. The padding applies to the entire object. (The space and sharp flags apply elementwise.) Fixes #11422. Fixes #10430. Change-Id: I758f0521caf71630437e43990ec6d6c9a92655e3 Reviewed-on: https://go-review.googlesource.com/11600 Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/encoding/binary')
0 files changed, 0 insertions, 0 deletions