diff --git a/cast5/cast5_test.go b/cast5/cast5_test.go index 5f7025f..778b272 100644 --- a/cast5/cast5_test.go +++ b/cast5/cast5_test.go @@ -52,8 +52,10 @@ func TestBasic(t *testing.T) { // However, due to the length of time taken, it's disabled here and a more // limited version is included, below. func TestFull(t *testing.T) { - // This is too slow for normal testing - return + if testing.Short() { + // This is too slow for normal testing + return + } a, b := iterate(1000000) diff --git a/openpgp/keys.go b/openpgp/keys.go index 08e6c71..13c4880 100644 --- a/openpgp/keys.go +++ b/openpgp/keys.go @@ -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 diff --git a/openpgp/packet/packet.go b/openpgp/packet/packet.go index 9b5cd88..ea3ee26 100644 --- a/openpgp/packet/packet.go +++ b/openpgp/packet/packet.go @@ -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 diff --git a/openpgp/packet/public_key.go b/openpgp/packet/public_key.go index fc9012d..72f8480 100644 --- a/openpgp/packet/public_key.go +++ b/openpgp/packet/public_key.go @@ -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 diff --git a/ssh/channel.go b/ssh/channel.go index be7b19f..2819e1a 100644 --- a/ssh/channel.go +++ b/ssh/channel.go @@ -340,8 +340,6 @@ func (c *serverChan) read(data []byte) (n int, err error, windowAdjustment uint3 c.cond.Wait() } - - panic("unreachable") } // getWindowSpace takes, at most, max bytes of space from the peer's window. It diff --git a/ssh/client_auth.go b/ssh/client_auth.go index ebb74a2..53c7b11 100644 --- a/ssh/client_auth.go +++ b/ssh/client_auth.go @@ -286,7 +286,6 @@ func (p *publickeyAuth) confirmKeyAck(key interface{}, t *transport) (bool, erro return false, UnexpectedMessageError{msgUserAuthSuccess, packet[0]} } } - panic("unreachable") } func (p *publickeyAuth) method() string { @@ -325,7 +324,6 @@ func handleAuthResponse(t *transport) (bool, []string, error) { return false, nil, UnexpectedMessageError{msgUserAuthSuccess, packet[0]} } } - panic("unreachable") } // ClientAuthKeyring returns a ClientAuth using public key authentication via diff --git a/ssh/server.go b/ssh/server.go index 7ecc694..06b276f 100644 --- a/ssh/server.go +++ b/ssh/server.go @@ -730,8 +730,6 @@ func (s *ServerConn) Accept() (Channel, error) { } } } - - panic("unreachable") } // A Listener implements a network listener (net.Listener) for SSH connections. diff --git a/ssh/server_terminal.go b/ssh/server_terminal.go index 708a915..7840030 100644 --- a/ssh/server_terminal.go +++ b/ssh/server_terminal.go @@ -77,5 +77,4 @@ func (ss *ServerTerminal) ReadLine() (line string, err error) { ss.Channel.AckRequest(ok) } } - panic("unreachable") } diff --git a/ssh/session_test.go b/ssh/session_test.go index d168ce8..96830e2 100644 --- a/ssh/session_test.go +++ b/ssh/session_test.go @@ -62,7 +62,6 @@ func dial(handler serverType, t *testing.T) *ClientConn { handler(ch.(*serverChan), t) }() } - <-done }() config := &ClientConfig{ diff --git a/ssh/transport.go b/ssh/transport.go index c222caf..536f7e4 100644 --- a/ssh/transport.go +++ b/ssh/transport.go @@ -139,7 +139,6 @@ func (t *transport) readPacket() ([]byte, error) { return packet, nil } } - panic("unreachable") } // Encrypt and send a packet of data to the remote peer.