Skip to content

Commit a980d23

Browse files
committed
Merge branch 'develop/v2' into v2
2 parents de7d95f + e613cad commit a980d23

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+204
-355
lines changed

.bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.4.0
1+
6.5.0

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
go_tags: [ 'stdlib', 'goccy', 'es256k', 'secp256k1-pem', 'asmbase64', 'alltags']
14-
go: [ '1.24', '1.23', '1.22' ]
14+
go: [ '1.24', '1.23' ]
1515
name: "Test [ Go ${{ matrix.go }} / Tags ${{ matrix.go_tags }} ]"
1616
steps:
1717
- name: Checkout repository

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
1010
with:
1111
go-version-file: "go.mod"
12-
- uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
12+
- uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
1313
- name: Run go vet
1414
run: |
1515
go vet ./...

.github/workflows/smoke.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
go_tags: [ 'stdlib', 'goccy', 'es256k', 'alltags' ]
17-
go: [ '1.24', '1.23', '1.22' ]
17+
go: [ '1.24', '1.23' ]
1818
name: "Smoke [ Go ${{ matrix.go }} / Tags ${{ matrix.go_tags }} ]"
1919
steps:
2020
- name: Checkout repository

.golangci.yml

+83-69
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,115 @@
1-
linters-settings:
2-
govet:
3-
enable-all: true
4-
disable:
5-
- shadow
6-
- fieldalignment
7-
1+
version: "2"
82
linters:
9-
enable-all: true
3+
default: all
104
disable:
115
- cyclop
126
- depguard
137
- dupl
14-
- exhaustive
15-
- errorlint
168
- err113
9+
- errorlint
10+
- exhaustive
11+
- funcorder
1712
- funlen
18-
- gci
1913
- gochecknoglobals
2014
- gochecknoinits
2115
- gocognit
2216
- gocritic
2317
- gocyclo
2418
- godot
2519
- godox
26-
- gofumpt
27-
- gomnd
2820
- gosec
21+
- gosmopolitan
2922
- govet
30-
- inamedparam # oh, sod off
31-
- ireturn # No, I _LIKE_ returning interfaces
23+
- inamedparam
24+
- ireturn
3225
- lll
33-
- maintidx # Do this in code review
26+
- maintidx
3427
- makezero
3528
- mnd
3629
- nakedret
3730
- nestif
3831
- nlreturn
39-
- nonamedreturns # visit this back later
32+
- nonamedreturns
4033
- paralleltest
4134
- perfsprint
4235
- recvcheck
36+
- staticcheck
4337
- tagliatelle
44-
- testifylint # TODO: revisit when we have the chance
38+
- testifylint
4539
- testpackage
46-
- thelper # Tests are fine
47-
- varnamelen # Short names are ok
40+
- thelper
41+
- varnamelen
4842
- wrapcheck
4943
- wsl
50-
44+
settings:
45+
govet:
46+
disable:
47+
- shadow
48+
- fieldalignment
49+
enable-all: true
50+
exclusions:
51+
generated: lax
52+
presets:
53+
- comments
54+
- common-false-positives
55+
- legacy
56+
- std-error-handling
57+
rules:
58+
- linters:
59+
- staticcheck
60+
path: /*.go
61+
text: 'ST1003: should not use underscores in package names'
62+
- linters:
63+
- revive
64+
path: /*.go
65+
text: don't use an underscore in package name
66+
- linters:
67+
- staticcheck
68+
text: SA1019
69+
- linters:
70+
- contextcheck
71+
- exhaustruct
72+
path: /*.go
73+
- linters:
74+
- errcheck
75+
path: /main.go
76+
- linters:
77+
- errcheck
78+
path: internal/codegen/codegen.go
79+
- linters:
80+
- errcheck
81+
- errchkjson
82+
- forcetypeassert
83+
path: internal/jwxtest/jwxtest.go
84+
- linters:
85+
- errcheck
86+
- errchkjson
87+
- forcetypeassert
88+
path: /*_test.go
89+
- linters:
90+
- forbidigo
91+
path: /*_example_test.go
92+
- linters:
93+
- forbidigo
94+
path: cmd/jwx/jwx.go
95+
- linters:
96+
- revive
97+
path: /*_test.go
98+
text: 'var-naming: '
99+
paths:
100+
- third_party$
101+
- builtin$
102+
- examples$
51103
issues:
52-
exclude-rules:
53-
# not needed
54-
- path: /*.go
55-
text: "ST1003: should not use underscores in package names"
56-
linters:
57-
- stylecheck
58-
- path: /*.go
59-
text: "don't use an underscore in package name"
60-
linters:
61-
- revive
62-
- linters:
63-
- staticcheck
64-
text: 'SA1019'
65-
- path: /*.go
66-
linters:
67-
- contextcheck
68-
- exhaustruct
69-
- path: /main.go
70-
linters:
71-
- errcheck
72-
- path: internal/codegen/codegen.go
73-
linters:
74-
- errcheck
75-
- path: internal/jwxtest/jwxtest.go
76-
linters:
77-
- errcheck
78-
- errchkjson
79-
- forcetypeassert
80-
- path: /*_test.go
81-
linters:
82-
- errcheck
83-
- errchkjson
84-
- forcetypeassert
85-
- path: /*_example_test.go
86-
linters:
87-
- forbidigo
88-
- path: cmd/jwx/jwx.go
89-
linters:
90-
- forbidigo
91-
- path: /*_test.go
92-
text: "var-naming: "
93-
linters:
94-
- revive
95-
96-
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
97104
max-issues-per-linter: 0
98-
99-
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
100105
max-same-issues: 0
101-
106+
formatters:
107+
enable:
108+
- gofmt
109+
- goimports
110+
exclusions:
111+
generated: lax
112+
paths:
113+
- third_party$
114+
- builtin$
115+
- examples$

Changes

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ Changes
44
v2 has many incompatibilities with v1. To see the full list of differences between
55
v1 and v2, please read the Changes-v2.md file (https://github.com/lestrrat-go/jwx/blob/develop/v2/Changes-v2.md)
66

7-
v2.1.4 Feb 25 2025
7+
v2.1.5 16 Apr 2025
8+
* Update minimum require go version to 1.23; this is an indirect consequence
9+
of updateing github.com/lestrrat-go/blackmagic
10+
* backport #1308
11+
12+
v2.1.4 25 Feb 2025
813
* Update code to work with go1.24
914
* Update tests to work with recent latchset/jose
1015
* Fix build pipeline to work with latest golangci-lint

WORKSPACE

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
44

55
http_archive(
66
name = "io_bazel_rules_go",
7-
sha256 = "dd926a88a564a9246713a9c00b35315f54cbd46b31a26d5d8fb264c07045f05d",
7+
sha256 = "f2d15bea3e241aa0e3a90fb17a82e6a8ab12214789f6aeddd53b8d04316d2b7c",
88
urls = [
9-
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
10-
"https://github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
9+
"https://mirror.bazel.build/github.com/bazel-contrib/rules_go/releases/download/v0.54.0/rules_go-v0.54.0.zip",
10+
"https://github.com/bazel-contrib/rules_go/releases/download/v0.54.0/rules_go-v0.54.0.zip",
1111
],
1212
)
1313

1414
http_archive(
1515
name = "bazel_gazelle",
16-
sha256 = "ecba0f04f96b4960a5b250c8e8eeec42281035970aa8852dda73098274d14a1d",
16+
integrity = "sha256-12v3pg/YsFBEQJDfooN6Tq+YKeEWVhjuNdzspcvfWNU=",
1717
urls = [
18-
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz",
19-
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz",
18+
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.37.0/bazel-gazelle-v0.37.0.tar.gz",
19+
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.37.0/bazel-gazelle-v0.37.0.tar.gz",
2020
],
2121
)
2222

@@ -29,7 +29,7 @@ go_dependencies()
2929

3030
go_rules_dependencies()
3131

32-
go_register_toolchains(version = "1.20.14")
32+
go_register_toolchains(version = "1.23.8")
3333

3434
gazelle_dependencies()
3535

bench/performance/go.mod

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
module github.com/lestrrat-go/jwx/v2/bench/performance
22

3-
go 1.16
3+
go 1.23
44

55
require github.com/lestrrat-go/jwx/v2 v2.0.21
6+
7+
require (
8+
github.com/davecgh/go-spew v1.1.1 // indirect
9+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
10+
github.com/goccy/go-json v0.10.2 // indirect
11+
github.com/lestrrat-go/blackmagic v1.0.2 // indirect
12+
github.com/lestrrat-go/httpcc v1.0.1 // indirect
13+
github.com/lestrrat-go/httprc v1.0.5 // indirect
14+
github.com/lestrrat-go/iter v1.0.2 // indirect
15+
github.com/lestrrat-go/option v1.0.1 // indirect
16+
github.com/pmezard/go-difflib v1.0.0 // indirect
17+
github.com/segmentio/asm v1.2.0 // indirect
18+
github.com/stretchr/testify v1.9.0 // indirect
19+
golang.org/x/crypto v0.21.0 // indirect
20+
golang.org/x/sys v0.18.0 // indirect
21+
gopkg.in/yaml.v3 v3.0.1 // indirect
22+
)

bench/performance/go.sum

-48
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
22
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
33
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
4-
github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo=
54
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs=
65
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0=
76
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
@@ -16,68 +15,21 @@ github.com/lestrrat-go/iter v1.0.2 h1:gMXo1q4c2pHmC3dn8LzRhJfP1ceCbgSiT9lUydIzlt
1615
github.com/lestrrat-go/iter v1.0.2/go.mod h1:Momfcq3AnRlRjI5b5O8/G5/BvpzrhoFTZcn06fEOPt4=
1716
github.com/lestrrat-go/jwx/v2 v2.0.21 h1:jAPKupy4uHgrHFEdjVjNkUgoBKtVDgrQPB/h55FHrR0=
1817
github.com/lestrrat-go/jwx/v2 v2.0.21/go.mod h1:09mLW8zto6bWL9GbwnqAli+ArLf+5M33QLQPDggkUWM=
19-
github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I=
2018
github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNBEYU=
2119
github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I=
2220
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2321
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
2422
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
2523
github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=
2624
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
27-
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
28-
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
29-
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
3025
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
3126
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
32-
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
33-
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
3427
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
3528
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
36-
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
37-
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
38-
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
39-
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
4029
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
4130
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
42-
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
43-
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
44-
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
45-
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
46-
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
47-
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
48-
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
49-
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
50-
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
51-
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
52-
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
53-
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
54-
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
55-
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
56-
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
57-
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
58-
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
59-
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
60-
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
61-
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
6231
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
6332
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
64-
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
65-
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
66-
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
67-
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
68-
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
69-
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
70-
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
71-
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
72-
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
73-
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
74-
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
75-
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
76-
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
77-
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
78-
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
79-
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
80-
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
8133
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
8234
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
8335
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

bench/performance/jwx_benchmark_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func (c *Case) Run(b *testing.B) {
2626
}
2727

2828
b.Helper()
29-
for i := 0; i < b.N; i++ {
29+
for range b.N {
3030
b.StopTimer()
3131
if pretest := c.Pretest; pretest != nil {
3232
if err := pretest(b); err != nil {

cert/chain_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ func TestChain(t *testing.T) {
4545

4646
var chain cert.Chain
4747
for _, tc := range testcases {
48-
tc := tc
4948
t.Run(tc.Name, func(t *testing.T) {
5049
if !assert.NoError(t, chain.Add(tc.Data), `chain.Add should succeed`) {
5150
return
@@ -57,7 +56,7 @@ func TestChain(t *testing.T) {
5756
return
5857
}
5958

60-
for i := 0; i < chain.Len(); i++ {
59+
for i := range chain.Len() {
6160
der, ok := chain.Get(i)
6261
if !assert.True(t, ok, `chain.Get(%d) should succeed`, i) {
6362
return

0 commit comments

Comments
 (0)