core/lint: upgrade golangci-lint, replace interface{} with any (#5099)

* core/lint: upgrade golangci-lint, replace interface{} with any

* regen proto
This commit is contained in:
Caleb Doxsey 2024-05-02 14:33:52 -06:00 committed by GitHub
parent 614048ae9c
commit 1a5b8b606f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
135 changed files with 341 additions and 340 deletions

View file

@ -75,7 +75,7 @@ func loadKeys(data []byte, unmarshal func([]byte) (any, error)) ([]*jose.JSONWeb
return jwks, nil
}
func loadPrivateKey(b []byte) (interface{}, error) {
func loadPrivateKey(b []byte) (any, error) {
var wrappedErr error
var err error
var key any
@ -99,7 +99,7 @@ func loadPrivateKey(b []byte) (interface{}, error) {
}
// https://github.com/square/go-jose/tree/v2.5.1#supported-key-types
func loadPublicKey(b []byte) (interface{}, error) {
func loadPublicKey(b []byte) (any, error) {
var wrappedErr error
var err error
var key any
@ -130,7 +130,7 @@ func loadPublicKey(b []byte) (interface{}, error) {
}
// SignatureAlgorithmForKey returns the signature algorithm for the given key.
func SignatureAlgorithmForKey(key interface{}) (jose.SignatureAlgorithm, error) {
func SignatureAlgorithmForKey(key any) (jose.SignatureAlgorithm, error) {
switch key.(type) {
case *ecdsa.PrivateKey, *ecdsa.PublicKey:
return jose.ES256, nil