From e98c94ef6d107e6a43c490bae3f2eebf2af82bb8 Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Thu, 12 Nov 2026 19:38:56 -0300 Subject: [PATCH] refactor(cli): drop vars that only kept imports alive exec.go held `var _ = json.Marshal` and `var _ = strings.Join` to keep imports in use; json had no other use, so its import goes too. TestE2E_BuildUpExec_Image built an exec.Cmd it never ran. Co-Authored-By: Claude Opus 5.5 --- internal/cli/e2e_test.go | 3 --- internal/cli/exec.go | 4 ---- 2 files changed, 7 deletions(-) diff --git a/internal/cli/e2e_test.go b/internal/cli/e2e_test.go index e5ead69..789bfcc 100644 --- a/internal/cli/e2e_test.go +++ b/internal/cli/e2e_test.go @@ -37,9 +37,6 @@ func TestE2E_BuildUpExec_Image(t *testing.T) { t.Fatal("no containerId in up output") } - cmd := exec.Command(os.Args[0], "-test.run=^$") - _ = cmd - execCmd := exec.Command("docker", "exec", containerID, "echo", "e2e-test-ok") execOut, err := execCmd.CombinedOutput() if err != nil { diff --git a/internal/cli/exec.go b/internal/cli/exec.go index 24b5535..3e4d1ba 100644 --- a/internal/cli/exec.go +++ b/internal/cli/exec.go @@ -3,7 +3,6 @@ package cli import ( "cmp" "context" - "encoding/json" "errors" "fmt" "io" @@ -437,6 +436,3 @@ func splitExecArgs(args []string) (flags []string, cmd []string) { } return flags, nil } - -var _ = json.Marshal -var _ = strings.Join