Skip to content

Commit e98c94e

Browse files
aledbfclaude
andcommitted
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 <noreply@anthropic.com>
1 parent ca1c3bb commit e98c94e

2 files changed

Lines changed: 0 additions & 7 deletions

File tree

‎internal/cli/e2e_test.go‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ func TestE2E_BuildUpExec_Image(t *testing.T) {
3737
t.Fatal("no containerId in up output")
3838
}
3939

40-
cmd := exec.Command(os.Args[0], "-test.run=^$")
41-
_ = cmd
42-
4340
execCmd := exec.Command("docker", "exec", containerID, "echo", "e2e-test-ok")
4441
execOut, err := execCmd.CombinedOutput()
4542
if err != nil {

‎internal/cli/exec.go‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package cli
33
import (
44
"cmp"
55
"context"
6-
"encoding/json"
76
"errors"
87
"fmt"
98
"io"
@@ -437,6 +436,3 @@ func splitExecArgs(args []string) (flags []string, cmd []string) {
437436
}
438437
return flags, nil
439438
}
440-
441-
var _ = json.Marshal
442-
var _ = strings.Join

0 commit comments

Comments
 (0)