all: remove now-unnecessary unreachable panics

Take advantage of the new terminating statement rule.

R=golang-dev, r, gri
CC=golang-dev
https://golang.org/cl/7712044
This commit is contained in:
Brad Fitzpatrick 2013-03-11 14:16:55 -07:00
parent 5f91a62a3c
commit e15c0ac693
32 changed files with 1 additions and 39 deletions

View file

@ -739,6 +739,7 @@ func (d *decodeState) valueInterface() interface{} {
switch d.scanWhile(scanSkipSpace) {
default:
d.error(errPhase)
panic("unreachable")
case scanBeginArray:
return d.arrayInterface()
case scanBeginObject:
@ -746,7 +747,6 @@ func (d *decodeState) valueInterface() interface{} {
case scanBeginLiteral:
return d.literalInterface()
}
panic("unreachable")
}
// arrayInterface is like array but returns []interface{}.