1
0

In GetProcessPIDs() var pids was moved to return values. Added a comment.

This commit is contained in:
Alexander Andreev 2023-02-04 20:35:23 +04:00
parent 620c9874c2
commit 59a30d5c93
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -8,9 +8,8 @@ import (
"strings" "strings"
) )
func GetProcessPIDs(name string) ([]int, error) { // GetProcessPIDs returns a list of PIDs found for a process.
var pids []int func GetProcessPIDs(name string) (pids []int, err error) {
dir, err := os.ReadDir("/proc/") dir, err := os.ReadDir("/proc/")
if err != nil { if err != nil {
return nil, err return nil, err