From: Russ Cox Date: Tue, 16 Dec 2008 22:39:29 +0000 (-0800) Subject: clear flags so that %+v does not pass the + X-Git-Tag: weekly.2009-11-06~2500 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=67a7abad7f1cfabc5715f6e47887d82186eb8d59;p=gostls13.git clear flags so that %+v does not pass the + to the first field it prints. R=r DELTA=2 (1 added, 0 deleted, 1 changed) OCL=21324 CL=21328 --- diff --git a/src/lib/fmt/print.go b/src/lib/fmt/print.go index 9ac241f8dc..426bca1861 100644 --- a/src/lib/fmt/print.go +++ b/src/lib/fmt/print.go @@ -386,7 +386,8 @@ func (p *P) printField(field reflect.Value) (was_string bool) { p.add('{'); v := field.(reflect.StructValue); t := v.Type().(reflect.StructType); - donames := p.fmt.plus; // first p.printField clears flag + donames := p.fmt.plus; + p.fmt.clearflags(); // clear flags for p.printField for i := 0; i < v.Len(); i++ { if i > 0 { p.add(' ')