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"
|
"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
|
||||||
|
Loading…
Reference in New Issue
Block a user