Move to typical go project layout, fix golangci-lint warnings, update deps
This commit is contained in:
7
vendor/github.com/shirou/gopsutil/v3/process/process_darwin_nocgo.go
generated
vendored
7
vendor/github.com/shirou/gopsutil/v3/process/process_darwin_nocgo.go
generated
vendored
@@ -24,14 +24,21 @@ func (p *Process) ExeWithContext(ctx context.Context) (string, error) {
|
||||
}
|
||||
txtFound := 0
|
||||
lines := strings.Split(string(out), "\n")
|
||||
fallback := ""
|
||||
for i := 1; i < len(lines); i++ {
|
||||
if lines[i] == "ftxt" {
|
||||
txtFound++
|
||||
if txtFound == 1 {
|
||||
fallback = lines[i-1][1:]
|
||||
}
|
||||
if txtFound == 2 {
|
||||
return lines[i-1][1:], nil
|
||||
}
|
||||
}
|
||||
}
|
||||
if fallback != "" {
|
||||
return fallback, nil
|
||||
}
|
||||
return "", fmt.Errorf("missing txt data returned by lsof")
|
||||
}
|
||||
|
||||
|
||||
7
vendor/github.com/shirou/gopsutil/v3/process/process_openbsd.go
generated
vendored
7
vendor/github.com/shirou/gopsutil/v3/process/process_openbsd.go
generated
vendored
@@ -68,7 +68,12 @@ func (p *Process) NameWithContext(ctx context.Context) (string, error) {
|
||||
}
|
||||
|
||||
func (p *Process) CwdWithContext(ctx context.Context) (string, error) {
|
||||
return "", common.ErrNotImplementedError
|
||||
mib := []int32{CTLKern, KernProcCwd, p.Pid}
|
||||
buf, _, err := common.CallSyscall(mib)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return common.ByteToString(buf), nil
|
||||
}
|
||||
|
||||
func (p *Process) ExeWithContext(ctx context.Context) (string, error) {
|
||||
|
||||
1
vendor/github.com/shirou/gopsutil/v3/process/process_openbsd_386.go
generated
vendored
1
vendor/github.com/shirou/gopsutil/v3/process/process_openbsd_386.go
generated
vendored
@@ -14,6 +14,7 @@ const (
|
||||
KernProcProc = 8
|
||||
KernProcPathname = 12
|
||||
KernProcArgs = 55
|
||||
KernProcCwd = 78
|
||||
KernProcArgv = 1
|
||||
KernProcEnv = 3
|
||||
)
|
||||
|
||||
1
vendor/github.com/shirou/gopsutil/v3/process/process_openbsd_amd64.go
generated
vendored
1
vendor/github.com/shirou/gopsutil/v3/process/process_openbsd_amd64.go
generated
vendored
@@ -11,6 +11,7 @@ const (
|
||||
KernProcProc = 8
|
||||
KernProcPathname = 12
|
||||
KernProcArgs = 55
|
||||
KernProcCwd = 78
|
||||
KernProcArgv = 1
|
||||
KernProcEnv = 3
|
||||
)
|
||||
|
||||
1
vendor/github.com/shirou/gopsutil/v3/process/process_openbsd_arm.go
generated
vendored
1
vendor/github.com/shirou/gopsutil/v3/process/process_openbsd_arm.go
generated
vendored
@@ -14,6 +14,7 @@ const (
|
||||
KernProcProc = 8
|
||||
KernProcPathname = 12
|
||||
KernProcArgs = 55
|
||||
KernProcCwd = 78
|
||||
KernProcArgv = 1
|
||||
KernProcEnv = 3
|
||||
)
|
||||
|
||||
1
vendor/github.com/shirou/gopsutil/v3/process/process_openbsd_arm64.go
generated
vendored
1
vendor/github.com/shirou/gopsutil/v3/process/process_openbsd_arm64.go
generated
vendored
@@ -14,6 +14,7 @@ const (
|
||||
KernProcProc = 8
|
||||
KernProcPathname = 12
|
||||
KernProcArgs = 55
|
||||
KernProcCwd = 78
|
||||
KernProcArgv = 1
|
||||
KernProcEnv = 3
|
||||
)
|
||||
|
||||
1
vendor/github.com/shirou/gopsutil/v3/process/process_openbsd_riscv64.go
generated
vendored
1
vendor/github.com/shirou/gopsutil/v3/process/process_openbsd_riscv64.go
generated
vendored
@@ -14,6 +14,7 @@ const (
|
||||
KernProcProc = 8
|
||||
KernProcPathname = 12
|
||||
KernProcArgs = 55
|
||||
KernProcCwd = 78
|
||||
KernProcArgv = 1
|
||||
KernProcEnv = 3
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user