Skip to content

Commit 8e0c463

Browse files
odinugebradfitz
authored andcommitted
fmt: remove unnecessary else statement
Change-Id: If30ccfcf56d56fb40102ad567a980793bd39f320 Reviewed-on: https://go-review.googlesource.com/34071 Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 850e55b commit 8e0c463

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/fmt/print.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -813,16 +813,15 @@ func (p *pp) printValue(value reflect.Value, verb rune, depth int) {
813813
if f.Kind() == reflect.Slice && f.IsNil() {
814814
p.buf.WriteString(nilParenString)
815815
return
816-
} else {
817-
p.buf.WriteByte('{')
818-
for i := 0; i < f.Len(); i++ {
819-
if i > 0 {
820-
p.buf.WriteString(commaSpaceString)
821-
}
822-
p.printValue(f.Index(i), verb, depth+1)
816+
}
817+
p.buf.WriteByte('{')
818+
for i := 0; i < f.Len(); i++ {
819+
if i > 0 {
820+
p.buf.WriteString(commaSpaceString)
823821
}
824-
p.buf.WriteByte('}')
822+
p.printValue(f.Index(i), verb, depth+1)
825823
}
824+
p.buf.WriteByte('}')
826825
} else {
827826
p.buf.WriteByte('[')
828827
for i := 0; i < f.Len(); i++ {

0 commit comments

Comments
 (0)