Update code to use pault.ag/go/sniff package (#5038)
* Update code to use pault.ag/go/sniff package * Update go dependencies
This commit is contained in:
parent
3e2bbbed3d
commit
d0423c6d4f
17 changed files with 213 additions and 59 deletions
10
vendor/github.com/mitchellh/go-ps/process_unix.go
generated
vendored
10
vendor/github.com/mitchellh/go-ps/process_unix.go
generated
vendored
|
|
@ -56,7 +56,7 @@ func processes() ([]Process, error) {
|
|||
|
||||
results := make([]Process, 0, 50)
|
||||
for {
|
||||
fis, err := d.Readdir(10)
|
||||
names, err := d.Readdirnames(10)
|
||||
if err == io.EOF {
|
||||
break
|
||||
}
|
||||
|
|
@ -64,14 +64,8 @@ func processes() ([]Process, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
for _, fi := range fis {
|
||||
// We only care about directories, since all pids are dirs
|
||||
if !fi.IsDir() {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, name := range names {
|
||||
// We only care if the name starts with a numeric
|
||||
name := fi.Name()
|
||||
if name[0] < '0' || name[0] > '9' {
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue