Skip to content

Commit 3517b11

Browse files
committed
fix: satisfy golangci-lint on the Linux-only detachedCommand test
Remove an unused helper left over from an earlier edit and reformat a call site golines flagged. The Linux build tag meant a local darwin lint run never analyzed this file; only GOOS=linux (as CI's ubuntu-latest job runs natively) caught it.
1 parent c04d039 commit 3517b11

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

cmd/agent_smith/run_command_linux_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ import (
99
)
1010

1111
func TestDetachedCommandWrapsInSystemdScope(t *testing.T) {
12-
cmd := detachedCommand("/opt/agent/rewst_agent_config.linux.bin", []string{"--update", "--org-id", "abc"}, os.Stdout, os.Stderr)
12+
cmd := detachedCommand(
13+
"/opt/agent/rewst_agent_config.linux.bin",
14+
[]string{"--update", "--org-id", "abc"},
15+
os.Stdout,
16+
os.Stderr,
17+
)
1318

1419
wantPath := "systemd-run"
1520
if got := cmd.Path; got != wantPath && !strings.HasSuffix(got, "/"+wantPath) {
@@ -43,7 +48,3 @@ func TestDetachedCommandWrapsInSystemdScope(t *testing.T) {
4348
t.Fatalf("Setsid = false, want true")
4449
}
4550
}
46-
47-
func endsWith(s, suffix string) bool {
48-
return len(s) >= len(suffix) && s[len(s)-len(suffix):] == suffix
49-
}

0 commit comments

Comments
 (0)