Skip to content

Commit

Permalink
Fix lint issues from recent golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Daisuke Maki committed Jan 16, 2025
1 parent 19d4fae commit 89f4887
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion jwe/jwe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ func TestGHIssue230(t *testing.T) {
func TestReadFile(t *testing.T) {
const s = `eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00ifQ.OKOawDo13gRp2ojaHV7LFpZcgV7T6DVZKTyKOMTYUmKoTCVJRgckCL9kiMT03JGeipsEdY3mx_etLbbWSrFr05kLzcSr4qKAq7YN7e9jwQRb23nfa6c9d-StnImGyFDbSv04uVuxIp5Zms1gNxKKK2Da14B8S4rzVRltdYwam_lDp5XnZAYpQdb76FdIKLaVmqgfwX7XWRxv2322i-vDxRfqNzo_tETKzpVLzfiwQyeyPGLBIO56YJ7eObdv0je81860ppamavo35UgoRdbYaBcoh9QcfylQr66oc6vFWXRcZ_ZT2LawVCWTIy3brGPi6UklfCpIMfIjf7iGdXKHzg.48V1_ALb6US04U3b.5eym8TW_c8SuK0ltJ3rpYIzOeDQz7TALvtu6UG9oMo4vpzs9tX_EFShS8iB7j6jiSdiwkIr3ajwQzaBtQD_A.XFBoMYUZodetZdvTiFvSkQ`

f, err := os.CreateTemp("", "test-read-file-*.jwe")
f, err := os.CreateTemp(t.TempDir(), "test-read-file-*.jwe")
require.NoError(t, err, `os.CreateTemp should succeed`)
defer f.Close()

Expand Down
4 changes: 2 additions & 2 deletions jwe/speed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import (
var s = []byte(`eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00ifQ.OKOawDo13gRp2ojaHV7LFpZcgV7T6DVZKTyKOMTYUmKoTCVJRgckCL9kiMT03JGeipsEdY3mx_etLbbWSrFr05kLzcSr4qKAq7YN7e9jwQRb23nfa6c9d-StnImGyFDbSv04uVuxIp5Zms1gNxKKK2Da14B8S4rzVRltdYwam_lDp5XnZAYpQdb76FdIKLaVmqgfwX7XWRxv2322i-vDxRfqNzo_tETKzpVLzfiwQyeyPGLBIO56YJ7eObdv0je81860ppamavo35UgoRdbYaBcoh9QcfylQr66oc6vFWXRcZ_ZT2LawVCWTIy3brGPi6UklfCpIMfIjf7iGdXKHzg.48V1_ALb6US04U3b.5eym8TW_c8SuK0ltJ3rpYIzOeDQz7TALvtu6UG9oMo4vpzs9tX_EFShS8iB7j6jiSdiwkIr3ajwQzaBtQD_A.XFBoMYUZodetZdvTiFvSkQ`)

func BenchmarkSplitLib(b *testing.B) {
for i := 0; i < b.N; i++ {
for range b.N {
SplitLib(s)
}
}

func BenchmarkSplitManual(b *testing.B) {
ret := make([][]byte, 5)
for i := 0; i < b.N; i++ {
for range b.N {
SplitManual(ret, s)
}
}
Expand Down
2 changes: 1 addition & 1 deletion jws/jws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ func TestDecode_ES384Compact_NoSigTrim(t *testing.T) {
func TestReadFile(t *testing.T) {
t.Parallel()

f, err := os.CreateTemp("", "test-read-file-*.jws")
f, err := os.CreateTemp(t.TempDir(), "test-read-file-*.jws")
require.NoError(t, err, `io.CreateTemp should succeed`)
defer f.Close()

Expand Down
2 changes: 1 addition & 1 deletion jwt/jwt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ func TestSignTyp(t *testing.T) {
func TestReadFile(t *testing.T) {
t.Parallel()

f, err := os.CreateTemp("", "test-read-file-*.jwt")
f, err := os.CreateTemp(t.TempDir(), "test-read-file-*.jwt")
require.NoError(t, err, `os.CreateTemp should succeed`)
defer f.Close()

Expand Down

0 comments on commit 89f4887

Please sign in to comment.