mitchellh / go-ps

Find, list, and inspect processes from Go (golang).
https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc
MIT License
1.47k stars 251 forks source link

If the process cannot be found, it is better to return an error #41

Closed jgbooks closed 4 years ago

jgbooks commented 4 years ago
// FindProcess looks up a single process by pid.
func FindProcess(pid int) (Process, error) {
    return findProcess(pid)
}

If the process cannot be found, it is better to return an error

jgbooks commented 4 years ago

I submitted it