From 3b35394e29403580adef50d5d4964fc8e3968423 Mon Sep 17 00:00:00 2001 From: Adam Bouqdib Date: Wed, 21 Feb 2024 04:59:54 +0300 Subject: [PATCH] chore(lint): fix unused-parameter error (#201) --- .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 } } }