summaryrefslogtreecommitdiff
path: root/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-05-14 13:18:54 -0600
committermo khan <mo@mokhan.ca>2025-05-14 13:18:54 -0600
commit4b2d609a0efcc1d9b2f1a08f954d067ad1d9cd1e (patch)
tree0afacf9217b0569130da6b97d4197331681bf119 /vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go
parentab373d1fe698cd3f53258c09bc8515d88a6d0b9e (diff)
test: use playwright to test out an OIDC login
Diffstat (limited to 'vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go')
-rw-r--r--vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go44
1 files changed, 22 insertions, 22 deletions
diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go b/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go
index 5e8a9e0..5a6d361 100644
--- a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go
+++ b/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go
@@ -8,7 +8,6 @@ import (
"context"
"encoding/binary"
"errors"
- "fmt"
"io"
"path/filepath"
"sort"
@@ -16,11 +15,12 @@ import (
"strings"
"unsafe"
- cpu "github.com/shirou/gopsutil/v4/cpu"
- "github.com/shirou/gopsutil/v4/internal/common"
- mem "github.com/shirou/gopsutil/v4/mem"
- net "github.com/shirou/gopsutil/v4/net"
"golang.org/x/sys/unix"
+
+ "github.com/shirou/gopsutil/v4/cpu"
+ "github.com/shirou/gopsutil/v4/internal/common"
+ "github.com/shirou/gopsutil/v4/mem"
+ "github.com/shirou/gopsutil/v4/net"
)
func pidsWithContext(ctx context.Context) ([]int32, error) {
@@ -37,7 +37,7 @@ func pidsWithContext(ctx context.Context) ([]int32, error) {
return ret, nil
}
-func (p *Process) PpidWithContext(ctx context.Context) (int32, error) {
+func (p *Process) PpidWithContext(_ context.Context) (int32, error) {
k, err := p.getKProc()
if err != nil {
return 0, err
@@ -69,7 +69,7 @@ func (p *Process) NameWithContext(ctx context.Context) (string, error) {
return name, nil
}
-func (p *Process) CwdWithContext(ctx context.Context) (string, error) {
+func (p *Process) CwdWithContext(_ context.Context) (string, error) {
mib := []int32{CTLKern, KernProcCwd, p.Pid}
buf, _, err := common.CallSyscall(mib)
if err != nil {
@@ -78,11 +78,11 @@ func (p *Process) CwdWithContext(ctx context.Context) (string, error) {
return common.ByteToString(buf), nil
}
-func (p *Process) ExeWithContext(ctx context.Context) (string, error) {
+func (p *Process) ExeWithContext(_ context.Context) (string, error) {
return "", common.ErrNotImplementedError
}
-func (p *Process) CmdlineSliceWithContext(ctx context.Context) ([]string, error) {
+func (p *Process) CmdlineSliceWithContext(_ context.Context) ([]string, error) {
mib := []int32{CTLKern, KernProcArgs, p.Pid, KernProcArgv}
buf, _, err := common.CallSyscall(mib)
if err != nil {
@@ -130,7 +130,7 @@ func readPtr(r io.Reader) (uintptr, error) {
}
return uintptr(p), nil
default:
- return 0, fmt.Errorf("unsupported pointer size")
+ return 0, errors.New("unsupported pointer size")
}
}
@@ -142,11 +142,11 @@ func (p *Process) CmdlineWithContext(ctx context.Context) (string, error) {
return strings.Join(argv, " "), nil
}
-func (p *Process) createTimeWithContext(ctx context.Context) (int64, error) {
+func (p *Process) createTimeWithContext(_ context.Context) (int64, error) {
return 0, common.ErrNotImplementedError
}
-func (p *Process) StatusWithContext(ctx context.Context) ([]string, error) {
+func (p *Process) StatusWithContext(_ context.Context) ([]string, error) {
k, err := p.getKProc()
if err != nil {
return []string{""}, err
@@ -178,7 +178,7 @@ func (p *Process) ForegroundWithContext(ctx context.Context) (bool, error) {
return strings.IndexByte(string(out), '+') != -1, nil
}
-func (p *Process) UidsWithContext(ctx context.Context) ([]uint32, error) {
+func (p *Process) UidsWithContext(_ context.Context) ([]uint32, error) {
k, err := p.getKProc()
if err != nil {
return nil, err
@@ -191,7 +191,7 @@ func (p *Process) UidsWithContext(ctx context.Context) ([]uint32, error) {
return uids, nil
}
-func (p *Process) GidsWithContext(ctx context.Context) ([]uint32, error) {
+func (p *Process) GidsWithContext(_ context.Context) ([]uint32, error) {
k, err := p.getKProc()
if err != nil {
return nil, err
@@ -203,7 +203,7 @@ func (p *Process) GidsWithContext(ctx context.Context) ([]uint32, error) {
return gids, nil
}
-func (p *Process) GroupsWithContext(ctx context.Context) ([]uint32, error) {
+func (p *Process) GroupsWithContext(_ context.Context) ([]uint32, error) {
k, err := p.getKProc()
if err != nil {
return nil, err
@@ -217,7 +217,7 @@ func (p *Process) GroupsWithContext(ctx context.Context) ([]uint32, error) {
return groups, nil
}
-func (p *Process) TerminalWithContext(ctx context.Context) (string, error) {
+func (p *Process) TerminalWithContext(_ context.Context) (string, error) {
k, err := p.getKProc()
if err != nil {
return "", err
@@ -233,7 +233,7 @@ func (p *Process) TerminalWithContext(ctx context.Context) (string, error) {
return termmap[ttyNr], nil
}
-func (p *Process) NiceWithContext(ctx context.Context) (int32, error) {
+func (p *Process) NiceWithContext(_ context.Context) (int32, error) {
k, err := p.getKProc()
if err != nil {
return 0, err
@@ -241,7 +241,7 @@ func (p *Process) NiceWithContext(ctx context.Context) (int32, error) {
return int32(k.Nice), nil
}
-func (p *Process) IOCountersWithContext(ctx context.Context) (*IOCountersStat, error) {
+func (p *Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error) {
k, err := p.getKProc()
if err != nil {
return nil, err
@@ -252,12 +252,12 @@ func (p *Process) IOCountersWithContext(ctx context.Context) (*IOCountersStat, e
}, nil
}
-func (p *Process) NumThreadsWithContext(ctx context.Context) (int32, error) {
+func (p *Process) NumThreadsWithContext(_ context.Context) (int32, error) {
/* not supported, just return 1 */
return 1, nil
}
-func (p *Process) TimesWithContext(ctx context.Context) (*cpu.TimesStat, error) {
+func (p *Process) TimesWithContext(_ context.Context) (*cpu.TimesStat, error) {
k, err := p.getKProc()
if err != nil {
return nil, err
@@ -305,11 +305,11 @@ func (p *Process) ChildrenWithContext(ctx context.Context) ([]*Process, error) {
return ret, nil
}
-func (p *Process) ConnectionsWithContext(ctx context.Context) ([]net.ConnectionStat, error) {
+func (p *Process) ConnectionsWithContext(_ context.Context) ([]net.ConnectionStat, error) {
return nil, common.ErrNotImplementedError
}
-func (p *Process) ConnectionsMaxWithContext(ctx context.Context, maxConn int) ([]net.ConnectionStat, error) {
+func (p *Process) ConnectionsMaxWithContext(_ context.Context, _ int) ([]net.ConnectionStat, error) {
return nil, common.ErrNotImplementedError
}