From 1602587bc8be857a30cbe7de689eba9c3bed452d Mon Sep 17 00:00:00 2001 From: Steven Hartland Date: Wed, 10 Jul 2024 08:15:54 +0100 Subject: [PATCH] chore: fix linter false positive Apply a workaround for the false positive for GO-S2307. --- plugin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.go b/plugin.go index 16c6b5a..a3362fd 100644 --- a/plugin.go +++ b/plugin.go @@ -46,7 +46,7 @@ func pluginFunc(cmd *cobra.Command, _ []string) error { return err } - defer f.Close() //nolint:errcheck // Read only file so We would have returned an error before if this failed. + defer func() { _ = f.Close() }() // Workaround false positive for GO-S2307. desc, err := plugin.Describe(f, goVersion, libcVersion) if err != nil {