go.crypto: remove unreachable code.

I ran go vet over all of go.crypto and removed lots of panic("unreachable") that are no longer needed.

R=golang-dev, r, dgryski
CC=golang-dev
https://golang.org/cl/10113043
This commit is contained in:
Adam Langley
2013-06-07 16:05:15 -04:00
parent 59566675d5
commit eca6c1626e
10 changed files with 4 additions and 16 deletions
-2
View File
@@ -250,8 +250,6 @@ func readToNextPublicKey(packets *packet.Reader) (err error) {
return
}
}
panic("unreachable")
}
// ReadEntity reads an entity (public key, identities, subkeys etc) from the
-2
View File
@@ -272,8 +272,6 @@ func consumeAll(r io.Reader) (n int64, err error) {
return
}
}
panic("unreachable")
}
// packetType represents the numeric ids of the different OpenPGP packet types. See
-1
View File
@@ -318,7 +318,6 @@ func (pk *PublicKey) VerifySignature(signed hash.Hash, sig *Signature) (err erro
default:
panic("shouldn't happen")
}
panic("unreachable")
}
// keySignatureHash returns a Hash of the message that needs to be signed for