Skip to content

Commit d2c2f7e

Browse files
committed
lint
1 parent 0e1b88b commit d2c2f7e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client_handler.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ var (
5252
errNoTransferConnection = errors.New("unable to open transfer: no transfer connection")
5353
errTLSRequired = errors.New("unable to open transfer: TLS is required")
5454
errInvalidTLSRequirement = errors.New("invalid TLS requirement")
55+
errNonTLSConnection = errors.New("GetTLSCiphersuite called on a nonTLS connection")
5556
)
5657

5758
func getHashMapping() map[string]HASHAlgo {
@@ -264,8 +265,9 @@ func (c *clientHandler) GetTLSCipherSuite() (uint16, error) {
264265
conn := c.conn
265266
tlsConn, ok := conn.(*tls.Conn)
266267
if !ok {
267-
return 0, errors.New("GetTLSCiphersuite called on a nonTLS connection")
268+
return 0, errNonTLSConnection
268269
}
270+
269271
return tlsConn.ConnectionState().CipherSuite, nil
270272
}
271273

0 commit comments

Comments
 (0)