mirror of
https://github.com/golang/go.git
synced 2024-09-22 19:08:30 +00:00
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
This commit is contained in:
parent
a10267adcd
commit
67a7abad7f
@ -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(' ')
|
||||
|
Loading…
Reference in New Issue
Block a user