From 4cf3dabd23e0c683fed4df090f9ca9836be934d5 Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Thu, 8 Aug 2024 02:26:32 +0300 Subject: [PATCH] fixed linter warnings --- env_test.go | 6 +++--- test_helpers.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/env_test.go b/env_test.go index c2a053d..278c218 100644 --- a/env_test.go +++ b/env_test.go @@ -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) { @@ -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", @@ -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", diff --git a/test_helpers.go b/test_helpers.go index f56b072..85fa63a 100644 --- a/test_helpers.go +++ b/test_helpers.go @@ -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{}