Skip to content

Commit

Permalink
fixed linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rekby committed Aug 7, 2024
1 parent 2e60da1 commit 4cf3dab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ func Test_MakeCacheKey(t *testing.T) {
noError(t, err)

expected := cacheKey(`{"func":"github.com/rekby/fixenv.Test_MakeCacheKey","fname":".../env_test.go","scope":0,"scope_name":"asdf","params":222}`)
requireJsonEquals(t, string(expected), string(res))
requireJSONEquals(t, string(expected), string(res))
}

func Test_MakeCacheKeyFromFrame(t *testing.T) {
Expand All @@ -594,7 +594,7 @@ func Test_MakeCacheKeyFromFrame(t *testing.T) {
File: "/asd/file_name.go",
}, "scope-name", false)
noError(t, err)
requireJsonEquals(t, `{
requireJSONEquals(t, `{
"scope": 0,
"scope_name": "scope-name",
"func": "func_name",
Expand All @@ -610,7 +610,7 @@ func Test_MakeCacheKeyFromFrame(t *testing.T) {
File: "/asd/file_name.go",
}, "scope-name", true)
noError(t, err)
requireJsonEquals(t, `{
requireJSONEquals(t, `{
"scope": 0,
"scope_name": "scope-name",
"func": "func_name",
Expand Down
4 changes: 2 additions & 2 deletions test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ func requireContains(t *testing.T, s, substr string) {
func requirePanic(t *testing.T, f func()) {
t.Helper()
defer func() {
recover()
_ = recover()
}()

f()
t.Fatal("the function must raise panic")
}

func requireJsonEquals(t *testing.T, v1 string, v2 string) {
func requireJSONEquals(t *testing.T, v1 string, v2 string) {
t.Helper()
var vj1 interface{}
var vj2 interface{}
Expand Down

0 comments on commit 4cf3dab

Please sign in to comment.