]> Cypherpunks repositories - gostls13.git/commit
fmt: part 2 of the great flag rebuild: make %+v work in formatters
authorRob Pike <r@golang.org>
Fri, 3 Oct 2014 20:23:35 +0000 (13:23 -0700)
committerRob Pike <r@golang.org>
Fri, 3 Oct 2014 20:23:35 +0000 (13:23 -0700)
commita22424567c622ee0b111787a37e775c815d2e14b
treef67651acb984f5442d5af38b20d45eb282bb6fc7
parent13da3608453f7d50c0c810d5a0df79691bca8b64
fmt: part 2 of the great flag rebuild: make %+v work in formatters
Apply a similar transformation to %+v that we did to %#v, making it
a top-level setting separate from the + flag itself. This fixes the
appearance of flags in Formatters and cleans up the code too,
probably making it a little faster.

Fixes #8835.

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