Skip to content

Commit f65c7c6

Browse files
authored
small cleanups (#109)
1 parent b938517 commit f65c7c6

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

algo_hs.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ func newHS(alg Algorithm, key []byte) (hmacAlgo, error) {
3838
alg: alg,
3939
hash: hash,
4040
key: key,
41-
hashPool: &sync.Pool{New: func() interface{} {
42-
return hmac.New(hash.New, key)
43-
}},
41+
hashPool: &sync.Pool{
42+
New: func() interface{} {
43+
return hmac.New(hash.New, key)
44+
},
45+
},
4446
}, nil
4547
}
4648

algo_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func TestSignerAlg(t *testing.T) {
2626

2727
f(mustSigner(NewSignerES(ES256, ecdsaPrivateKey256)), ES256)
2828
f(mustSigner(NewSignerES(ES384, ecdsaPrivateKey384)), ES384)
29-
// f(mustSigner(NewSignerES(ES512, ecdsaPrivateKey521)), ES512)
29+
f(mustSigner(NewSignerES(ES512, ecdsaPrivateKey521)), ES512)
3030
}
3131

3232
func TestVerifierAlg(t *testing.T) {

jwt_test.go

-5
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ func mustVerifier(v Verifier, err error) Verifier {
2828
return v
2929
}
3030

31-
type customClaims struct {
32-
StandardClaims
33-
TestField string `json:"test_field"`
34-
}
35-
3631
func TestMarshalHeader(t *testing.T) {
3732
f := func(h *Header, want string) {
3833
t.Helper()

0 commit comments

Comments
 (0)