summaryrefslogtreecommitdiff
path: root/src/fmt/format.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/fmt/format.go')
-rw-r--r--src/fmt/format.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/fmt/format.go b/src/fmt/format.go
index a92f3c2f8..355b73262 100644
--- a/src/fmt/format.go
+++ b/src/fmt/format.go
@@ -49,9 +49,14 @@ type fmt struct {
plus bool
sharp bool
space bool
- unicode bool
- uniQuote bool // Use 'x'= prefix for %U if printable.
- zero bool
+ // For the format %#v, we set this flag and
+ // clear the plus flag, since it is in effect
+ // a different, flagless format set at the top level.
+ // TODO: plusV could use this too.
+ sharpV bool
+ unicode bool
+ uniQuote bool // Use 'x'= prefix for %U if printable.
+ zero bool
}
func (f *fmt) clearflags() {
@@ -63,6 +68,7 @@ func (f *fmt) clearflags() {
f.plus = false
f.sharp = false
f.space = false
+ f.sharpV = false
f.unicode = false
f.uniQuote = false
f.zero = false