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")