]> Cypherpunks repositories - gostls13.git/commit
fmt: document and fix the handling of precision for strings and byte slices
authorRob Pike <r@golang.org>
Wed, 24 Sep 2014 21:33:30 +0000 (14:33 -0700)
committerRob Pike <r@golang.org>
Wed, 24 Sep 2014 21:33:30 +0000 (14:33 -0700)
commit54111a5893cf3a1de6f79729832c3ad9bb1a193b
tree5a571af92758ec2793a5fbd016508e187467baca
parent193daab9889708f7a20ff46efe0fa4b2bf0468d3
fmt: document and fix the handling of precision for strings and byte slices
Previous behavior was undocumented and inconsistent. Now it is documented
and consistent and measures the input size, since that makes more sense
when talking about %q and %x. For %s the change has no effect.

Fixes #8151.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/144540044
src/fmt/doc.go
src/fmt/fmt_test.go
src/fmt/format.go