IsErrTLSHandshakeFailure returns whether err is a TLS handshake or certificate verification error
(err error)
| 34 | |
| 35 | // IsErrTLSHandshakeFailure returns whether err is a TLS handshake or certificate verification error |
| 36 | func IsErrTLSHandshakeFailure(err error) bool { |
| 37 | errStr := err.Error() |
| 38 | return strings.Contains(errStr, "tls:") || |
| 39 | strings.Contains(errStr, "x509:") || |
| 40 | strings.Contains(errStr, "certificate") |
| 41 | } |
no test coverage detected
searching dependent graphs…