diff --git a/internal/common/common_unix.go b/internal/common/common_unix.go index 9e393bcf..60520281 100644 --- a/internal/common/common_unix.go +++ b/internal/common/common_unix.go @@ -41,8 +41,7 @@ func CallLsofWithContext(ctx context.Context, invoke Invoker, pid int32, args .. } func CallPgrepWithContext(ctx context.Context, invoke Invoker, pid int32) ([]int32, error) { - var cmd []string - cmd = []string{"-P", strconv.Itoa(int(pid))} + cmd := []string{"-P", strconv.Itoa(int(pid))} pgrep, err := exec.LookPath("pgrep") if err != nil { return []int32{}, err