From 59a30d5c93b090612661e35ad24eed0c6da80fe8 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sat, 4 Feb 2023 20:35:23 +0400 Subject: [PATCH] In GetProcessPIDs() var pids was moved to return values. Added a comment. --- proc.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/proc.go b/proc.go index 441cb0d..00dcc73 100644 --- a/proc.go +++ b/proc.go @@ -8,9 +8,8 @@ import ( "strings" ) -func GetProcessPIDs(name string) ([]int, error) { - var pids []int - +// GetProcessPIDs returns a list of PIDs found for a process. +func GetProcessPIDs(name string) (pids []int, err error) { dir, err := os.ReadDir("/proc/") if err != nil { return nil, err