From dd7abd08987ee92105fc0204e9ab89852789763b Mon Sep 17 00:00:00 2001 From: jackgopack4 Date: Thu, 19 Sep 2024 12:42:15 -0400 Subject: [PATCH] fix linting --- cmd/builder/internal/version_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/builder/internal/version_test.go b/cmd/builder/internal/version_test.go index 9a51d23f837..8a0c222b09d 100644 --- a/cmd/builder/internal/version_test.go +++ b/cmd/builder/internal/version_test.go @@ -59,11 +59,11 @@ func TestBinVersion(t *testing.T) { } } -var validBinVersionFunc binVersionFunc = func(fn debugReadBuildInfoFunc) (string, error) { +var validBinVersionFunc binVersionFunc = func(_ debugReadBuildInfoFunc) (string, error) { return "v1.0.0", nil } -var invalidBinVersionFunc binVersionFunc = func(fn debugReadBuildInfoFunc) (string, error) { +var invalidBinVersionFunc binVersionFunc = func(_ debugReadBuildInfoFunc) (string, error) { return "", fmt.Errorf("failed to get version") } @@ -99,9 +99,9 @@ func TestVersionCommand(t *testing.T) { parentCmd.AddCommand(cmd) // Capture the output output := bytes.NewBufferString("") - err_output := bytes.NewBufferString("") + errOutput := bytes.NewBufferString("") cmd.SetOut(output) - cmd.SetErr(err_output) + cmd.SetErr(errOutput) // Create a new context with a fake value type contextKey string ctx := context.WithValue(context.Background(), contextKey("key"), "value")