From 281200cc9c940437da8951c33e6d7ced82171c47 Mon Sep 17 00:00:00 2001 From: Adam Bouqdib Date: Wed, 21 Feb 2024 01:58:23 +0000 Subject: [PATCH] chore(lint): fix unused-parameter error --- .golangci.yml | 3 +++ nilcheck.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index fbe2a24..73f76b4 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -59,5 +59,8 @@ issues: - path: ((.+)_test.go|internal/test/(.+)) linters: [govet] text: '^fieldalignment:' + - path: ((.+)_test.go|internal/test/(.+)) + linters: [revive] + text: '^unused-parameter:' - linters: [govet] text: '^shadow: declaration of "err" shadows declaration' diff --git a/nilcheck.go b/nilcheck.go index 7e96530..cc18778 100644 --- a/nilcheck.go +++ b/nilcheck.go @@ -22,6 +22,6 @@ func newNilCheck(zero any) func(v any) bool { return func(v any) bool { return (*reflect.SliceHeader)(dataOf(v)).Data == 0 } default: // Return false for all others. - return func(v any) bool { return false } + return func(any) bool { return false } } }