mirror of
https://github.com/golang/go
synced 2024-11-23 16:20:04 -07:00
fmt: remove unnecessary else statement
Change-Id: If30ccfcf56d56fb40102ad567a980793bd39f320 Reviewed-on: https://go-review.googlesource.com/34071 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
850e55b8c0
commit
8e0c4639f1
@ -813,16 +813,15 @@ func (p *pp) printValue(value reflect.Value, verb rune, depth int) {
|
||||
if f.Kind() == reflect.Slice && f.IsNil() {
|
||||
p.buf.WriteString(nilParenString)
|
||||
return
|
||||
} else {
|
||||
p.buf.WriteByte('{')
|
||||
for i := 0; i < f.Len(); i++ {
|
||||
if i > 0 {
|
||||
p.buf.WriteString(commaSpaceString)
|
||||
}
|
||||
p.printValue(f.Index(i), verb, depth+1)
|
||||
}
|
||||
p.buf.WriteByte('}')
|
||||
}
|
||||
p.buf.WriteByte('{')
|
||||
for i := 0; i < f.Len(); i++ {
|
||||
if i > 0 {
|
||||
p.buf.WriteString(commaSpaceString)
|
||||
}
|
||||
p.printValue(f.Index(i), verb, depth+1)
|
||||
}
|
||||
p.buf.WriteByte('}')
|
||||
} else {
|
||||
p.buf.WriteByte('[')
|
||||
for i := 0; i < f.Len(); i++ {
|
||||
|
Loading…
Reference in New Issue
Block a user