We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcd9aed commit f5dc865Copy full SHA for f5dc865
token/token.go
@@ -58,12 +58,10 @@ func AuthKeyFromBytes(bytes []byte) (*ecdsa.PrivateKey, error) {
58
if err != nil {
59
return nil, err
60
}
61
- switch pk := key.(type) {
62
- case *ecdsa.PrivateKey:
+ if pk, ok := key.(*ecdsa.PrivateKey); ok {
63
return pk, nil
64
- default:
65
- return nil, ErrAuthKeyNotECDSA
66
+ return nil, ErrAuthKeyNotECDSA
67
68
69
// GenerateIfExpired checks to see if the token is about to expire and
0 commit comments