In GetProcessPIDs() var pids was moved to return values. Added a comment.
This commit is contained in:
parent
620c9874c2
commit
59a30d5c93
5
proc.go
5
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
|
||||
|
Loading…
Reference in New Issue
Block a user