diff --git a/go.mod b/go.mod index 7de33c60fc..68b5d24b9a 100644 --- a/go.mod +++ b/go.mod @@ -60,7 +60,7 @@ require ( github.com/opencontainers/selinux v1.12.0 github.com/openshift/imagebuilder v1.2.16 github.com/rootless-containers/rootlesskit/v2 v2.3.5 - github.com/shirou/gopsutil/v4 v4.25.5 + github.com/shirou/gopsutil/v4 v4.25.6 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.9.1 github.com/spf13/pflag v1.0.6 diff --git a/go.sum b/go.sum index 4bbd23e8b8..e770d3f592 100644 --- a/go.sum +++ b/go.sum @@ -385,8 +385,8 @@ github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= -github.com/shirou/gopsutil/v4 v4.25.5 h1:rtd9piuSMGeU8g1RMXjZs9y9luK5BwtnG7dZaQUJAsc= -github.com/shirou/gopsutil/v4 v4.25.5/go.mod h1:PfybzyydfZcN+JMMjkF6Zb8Mq1A/VcogFFg7hj50W9c= +github.com/shirou/gopsutil/v4 v4.25.6 h1:kLysI2JsKorfaFPcYmcJqbzROzsBWEOAtw6A7dIfqXs= +github.com/shirou/gopsutil/v4 v4.25.6/go.mod h1:PfybzyydfZcN+JMMjkF6Zb8Mq1A/VcogFFg7hj50W9c= github.com/sigstore/fulcio v1.6.6 h1:XaMYX6TNT+8n7Npe8D94nyZ7/ERjEsNGFC+REdi/wzw= github.com/sigstore/fulcio v1.6.6/go.mod h1:BhQ22lwaebDgIxVBEYOOqLRcN5+xOV+C9bh/GUXRhOk= github.com/sigstore/protobuf-specs v0.4.1 h1:5SsMqZbdkcO/DNHudaxuCUEjj6x29tS2Xby1BxGU7Zc= diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_linux.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_linux.go index a3c60ff06c..c6ec17e9c9 100644 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_linux.go +++ b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_linux.go @@ -135,7 +135,7 @@ func finishCPUInfo(ctx context.Context, c *InfoStat) { var err error var value float64 - if len(c.CoreID) == 0 { + if c.CoreID == "" { lines, err = common.ReadLines(sysCPUPath(ctx, c.CPU, "topology/core_id")) if err == nil { c.CoreID = lines[0] diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_solaris.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_solaris.go index 3dcea896e5..9494e3c3f2 100644 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_solaris.go +++ b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_solaris.go @@ -140,8 +140,8 @@ func InfoWithContext(ctx context.Context) ([]InfoStat, error) { } result := make([]InfoStat, 0, len(flags)) - for _, proc := range procs { - procWithFlags := proc + for i := range procs { + procWithFlags := procs[i] procWithFlags.Flags = flags result = append(result, procWithFlags) } @@ -149,7 +149,7 @@ func InfoWithContext(ctx context.Context) ([]InfoStat, error) { return result, nil } -var flagsMatch = regexp.MustCompile(`[\w\.]+`) +var flagsMatch = regexp.MustCompile(`[\w.]+`) func parseISAInfo(cmdOutput string) ([]string, error) { words := flagsMatch.FindAllString(cmdOutput, -1) diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/common.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/common.go index 4f9b2f7b96..d48b41e511 100644 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/common.go +++ b/vendor/github.com/shirou/gopsutil/v4/internal/common/common.go @@ -115,7 +115,7 @@ func ReadLines(filename string) ([]string, error) { } // ReadLine reads a file and returns the first occurrence of a line that is prefixed with prefix. -func ReadLine(filename string, prefix string) (string, error) { +func ReadLine(filename, prefix string) (string, error) { f, err := os.Open(filename) if err != nil { return "", err @@ -156,7 +156,7 @@ func ReadLinesOffsetN(filename string, offset uint, n int) ([]string, error) { for i := uint(0); i < uint(n)+offset || n < 0; i++ { line, err := r.ReadString('\n') if err != nil { - if err == io.EOF && len(line) > 0 { + if err == io.EOF && line != "" { ret = append(ret, strings.Trim(line, "\n")) } break @@ -349,7 +349,7 @@ func PathExistsWithContents(filename string) bool { // GetEnvWithContext retrieves the environment variable key. If it does not exist it returns the default. // The context may optionally contain a map superseding os.EnvKey. -func GetEnvWithContext(ctx context.Context, key string, dfault string, combineWith ...string) string { +func GetEnvWithContext(ctx context.Context, key, dfault string, combineWith ...string) string { var value string if env, ok := ctx.Value(common.EnvKey).(common.EnvMap); ok { value = env[common.EnvKeyType(key)] @@ -365,7 +365,7 @@ func GetEnvWithContext(ctx context.Context, key string, dfault string, combineWi } // GetEnv retrieves the environment variable key. If it does not exist it returns the default. -func GetEnv(key string, dfault string, combineWith ...string) string { +func GetEnv(key, dfault string, combineWith ...string) string { value := os.Getenv(key) if value == "" { value = dfault diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_linux.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/common_linux.go index 04ec171583..ffaae423b3 100644 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_linux.go +++ b/vendor/github.com/shirou/gopsutil/v4/internal/common/common_linux.go @@ -317,11 +317,11 @@ func VirtualizationWithContext(ctx context.Context) (string, string, error) { return system, role, nil } -func GetOSRelease() (platform string, version string, err error) { +func GetOSRelease() (platform, version string, err error) { return GetOSReleaseWithContext(context.Background()) } -func GetOSReleaseWithContext(ctx context.Context) (platform string, version string, err error) { +func GetOSReleaseWithContext(ctx context.Context) (platform, version string, err error) { contents, err := ReadLines(HostEtcWithContext(ctx, "os-release")) if err != nil { return "", "", nil // return empty diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_unix.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/common_unix.go index c9f91b1698..2ccb376080 100644 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_unix.go +++ b/vendor/github.com/shirou/gopsutil/v4/internal/common/common_unix.go @@ -33,7 +33,7 @@ func CallLsofWithContext(ctx context.Context, invoke Invoker, pid int32, args .. var ret []string for _, l := range lines[1:] { - if len(l) == 0 { + if l == "" { continue } ret = append(ret, l) diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/readlink_linux.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/readlink_linux.go new file mode 100644 index 0000000000..ea2d4677b6 --- /dev/null +++ b/vendor/github.com/shirou/gopsutil/v4/internal/common/readlink_linux.go @@ -0,0 +1,53 @@ +package common + +import ( + "errors" + "os" + "sync" + "syscall" +) + +var bufferPool = sync.Pool{ + New: func() any { + b := make([]byte, syscall.PathMax) + return &b + }, +} + +// The following three functions are copied from stdlib. + +// ignoringEINTR2 is ignoringEINTR, but returning an additional value. +func ignoringEINTR2[T any](fn func() (T, error)) (T, error) { + for { + v, err := fn() + if !errors.Is(err, syscall.EINTR) { + return v, err + } + } +} + +// Many functions in package syscall return a count of -1 instead of 0. +// Using fixCount(call()) instead of call() corrects the count. +func fixCount(n int, err error) (int, error) { + if n < 0 { + n = 0 + } + return n, err +} + +// Readlink behaves like os.Readlink but caches the buffer passed to syscall.Readlink. +func Readlink(name string) (string, error) { + b := bufferPool.Get().(*[]byte) + + n, err := ignoringEINTR2(func() (int, error) { + return fixCount(syscall.Readlink(name, *b)) + }) + if err != nil { + bufferPool.Put(b) + return "", &os.PathError{Op: "readlink", Path: name, Err: err} + } + + result := string((*b)[:n]) + bufferPool.Put(b) + return result, nil +} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go b/vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go index 2d21a803c4..c1a9ed12da 100644 --- a/vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go +++ b/vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go @@ -11,10 +11,14 @@ import ( // https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-memorystatusex // https://learn.microsoft.com/en-us/windows/win32/api/psapi/ns-psapi-performance_information type ExVirtualMemory struct { - CommitLimit uint64 `json:"commitLimit"` - CommitTotal uint64 `json:"commitTotal"` - VirtualTotal uint64 `json:"virtualTotal"` - VirtualAvail uint64 `json:"virtualAvail"` + CommitLimit uint64 `json:"commitLimit"` + CommitTotal uint64 `json:"commitTotal"` + VirtualTotal uint64 `json:"virtualTotal"` + VirtualAvail uint64 `json:"virtualAvail"` + PhysTotal uint64 `json:"physTotal"` + PhysAvail uint64 `json:"physAvail"` + PageFileTotal uint64 `json:"pageFileTotal"` + PageFileAvail uint64 `json:"pageFileAvail"` } type ExWindows struct{} @@ -44,10 +48,14 @@ func (e *ExWindows) VirtualMemory() (*ExVirtualMemory, error) { } ret := &ExVirtualMemory{ - CommitLimit: perfInfo.commitLimit * perfInfo.pageSize, - CommitTotal: perfInfo.commitTotal * perfInfo.pageSize, - VirtualTotal: memInfo.ullTotalVirtual, - VirtualAvail: memInfo.ullAvailVirtual, + CommitLimit: perfInfo.commitLimit * perfInfo.pageSize, + CommitTotal: perfInfo.commitTotal * perfInfo.pageSize, + VirtualTotal: memInfo.ullTotalVirtual, + VirtualAvail: memInfo.ullAvailVirtual, + PhysTotal: memInfo.ullTotalPhys, + PhysAvail: memInfo.ullAvailPhys, + PageFileTotal: memInfo.ullTotalPageFile, + PageFileAvail: memInfo.ullAvailPageFile, } return ret, nil diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net.go b/vendor/github.com/shirou/gopsutil/v4/net/net.go index 78798c5a30..1d1f9f08b0 100644 --- a/vendor/github.com/shirou/gopsutil/v4/net/net.go +++ b/vendor/github.com/shirou/gopsutil/v4/net/net.go @@ -94,7 +94,7 @@ type ConntrackStat struct { SearchRestart uint32 `json:"searchRestart"` // Conntrack table lookups restarted due to hashtable resizes } -func NewConntrackStat(e uint32, s uint32, f uint32, n uint32, inv uint32, ign uint32, del uint32, dlst uint32, ins uint32, insfail uint32, drop uint32, edrop uint32, ie uint32, en uint32, ec uint32, ed uint32, sr uint32) *ConntrackStat { +func NewConntrackStat(e, s, f, n, inv, ign, del, dlst, ins, insfail, drop, edrop, ie, en, ec, ed, sr uint32) *ConntrackStat { return &ConntrackStat{ Entries: e, Searched: s, @@ -273,7 +273,7 @@ func getIOCountersAll(n []IOCountersStat) []IOCountersStat { return []IOCountersStat{r} } -// NetIOCounters returns network I/O statistics for every network +// IOCounters returns network I/O statistics for every network // interface installed on the system. If pernic argument is false, // return only sum of all information (which name is 'all'). If true, // every network interface installed on the system is returned @@ -296,7 +296,7 @@ func ProtoCounters(protocols []string) ([]ProtoCountersStat, error) { return ProtoCountersWithContext(context.Background(), protocols) } -// NetFilterCounters returns iptables conntrack statistics +// FilterCounters returns iptables conntrack statistics // the currently in use conntrack count and the max. // If the file does not exist or is invalid it will return nil. func FilterCounters() ([]FilterStat, error) { @@ -349,7 +349,7 @@ func ConnectionsPidMax(kind string, pid int32, maxConn int) ([]ConnectionStat, e // Pids retunres all pids. // Note: this is a copy of process_linux.Pids() -// FIXME: Import process occures import cycle. +// FIXME: Import process occurs import cycle. // move to common made other platform breaking. Need consider. func Pids() ([]int32, error) { return PidsWithContext(context.Background()) diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_aix.go b/vendor/github.com/shirou/gopsutil/v4/net/net_aix.go index a5fa8811f9..d5a93f41f8 100644 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_aix.go +++ b/vendor/github.com/shirou/gopsutil/v4/net/net_aix.go @@ -83,7 +83,7 @@ var portMatch = regexp.MustCompile(`(.*)\.(\d+)$`) // This function only works for netstat returning addresses with a "." // before the port (0.0.0.0.22 instead of 0.0.0.0:22). -func parseNetstatAddr(local string, remote string, family uint32) (laddr Addr, raddr Addr, err error) { +func parseNetstatAddr(local, remote string, family uint32) (laddr, raddr Addr, err error) { parse := func(l string) (Addr, error) { matches := portMatch.FindStringSubmatch(l) if matches == nil { @@ -183,7 +183,7 @@ func hasCorrectInetProto(kind, proto string) bool { return false } -func parseNetstatA(output string, kind string) ([]ConnectionStat, error) { +func parseNetstatA(output, kind string) ([]ConnectionStat, error) { var ret []ConnectionStat lines := strings.Split(string(output), "\n") diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_linux.go b/vendor/github.com/shirou/gopsutil/v4/net/net_linux.go index 969752625f..f01b04b503 100644 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_linux.go +++ b/vendor/github.com/shirou/gopsutil/v4/net/net_linux.go @@ -540,7 +540,7 @@ func PidsWithContext(ctx context.Context) ([]int32, error) { // Note: the following is based off process_linux structs and methods // we need these to fetch the owner of a process ID -// FIXME: Import process occures import cycle. +// FIXME: Import process occurs import cycle. // see remarks on pids() type process struct { Pid int32 `json:"pid"` @@ -793,7 +793,7 @@ func processUnix(file string, kind netConnectionKindType, inodes map[string][]in return ret, nil } -func updateMap(src map[string][]inodeMap, add map[string][]inodeMap) map[string][]inodeMap { +func updateMap(src, add map[string][]inodeMap) map[string][]inodeMap { for key, value := range add { a, exists := src[key] if !exists { diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_openbsd.go b/vendor/github.com/shirou/gopsutil/v4/net/net_openbsd.go index 481a276e3e..55087ce37d 100644 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_openbsd.go +++ b/vendor/github.com/shirou/gopsutil/v4/net/net_openbsd.go @@ -217,7 +217,7 @@ func parseNetstatLine(line string) (ConnectionStat, error) { return n, nil } -func parseNetstatAddr(local string, remote string, family uint32) (laddr Addr, raddr Addr, err error) { +func parseNetstatAddr(local, remote string, family uint32) (laddr, raddr Addr, err error) { parse := func(l string) (Addr, error) { matches := portMatch.FindStringSubmatch(l) if matches == nil { @@ -260,11 +260,7 @@ func ConnectionsWithContext(ctx context.Context, kind string) ([]ConnectionStat, switch strings.ToLower(kind) { default: fallthrough - case "": - fallthrough - case "all": - fallthrough - case "inet": + case "", "all", "inet": // nothing to add case "inet4": args = append(args, "-finet") diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_unix.go b/vendor/github.com/shirou/gopsutil/v4/net/net_unix.go index ae7e9d81a5..7c5153d308 100644 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_unix.go +++ b/vendor/github.com/shirou/gopsutil/v4/net/net_unix.go @@ -29,11 +29,7 @@ func ConnectionsPidWithContext(ctx context.Context, kind string, pid int32) ([]C switch strings.ToLower(kind) { default: fallthrough - case "": - fallthrough - case "all": - fallthrough - case "inet": + case "", "all", "inet": args = append(args, "tcp", "-i", "udp") case "inet4": args = append(args, "4") @@ -135,7 +131,7 @@ func parseNetLine(line string) (ConnectionStat, error) { return n, nil } -func parseNetAddr(line string) (laddr Addr, raddr Addr, err error) { +func parseNetAddr(line string) (laddr, raddr Addr, err error) { parse := func(l string) (Addr, error) { host, port, err := net.SplitHostPort(l) if err != nil { diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_darwin.go b/vendor/github.com/shirou/gopsutil/v4/process/process_darwin.go index 5afafd8d00..91f3932033 100644 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_darwin.go +++ b/vendor/github.com/shirou/gopsutil/v4/process/process_darwin.go @@ -45,7 +45,8 @@ func pidsWithContext(_ context.Context) ([]int32, error) { return ret, err } - for _, proc := range kprocs { + for i := range kprocs { + proc := &kprocs[i] ret = append(ret, int32(proc.Proc.P_pid)) } @@ -74,7 +75,7 @@ func (p *Process) NameWithContext(ctx context.Context) (string, error) { if err != nil { return "", err } - if len(cmdName) > 0 { + if cmdName != "" { extendedName := filepath.Base(cmdName) if strings.HasPrefix(extendedName, p.name) { name = extendedName @@ -238,7 +239,7 @@ func (p *Process) getKProc() (*unix.KinfoProc, error) { // Return value deletes Header line(you must not input wrong arg). // And splited by Space. Caller have responsibility to manage. // If passed arg pid is 0, get information from all process. -func callPsWithContext(ctx context.Context, arg string, pid int32, threadOption bool, nameOption bool) ([][]string, error) { +func callPsWithContext(ctx context.Context, arg string, pid int32, threadOption, nameOption bool) ([][]string, error) { var cmd []string switch { case pid == 0: // will get from all processes. @@ -396,7 +397,7 @@ func (p *Process) cmdlineSlice() ([]string, error) { // of the process. for _, arg := range args[1:] { argStr = string(arg) - if len(argStr) > 0 { + if argStr != "" { if nargs > 0 { argSlice = append(argSlice, argStr) nargs-- diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_linux.go b/vendor/github.com/shirou/gopsutil/v4/process/process_linux.go index bf96fd3864..f44f6bc6f7 100644 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_linux.go +++ b/vendor/github.com/shirou/gopsutil/v4/process/process_linux.go @@ -358,7 +358,7 @@ func (p *Process) ChildrenWithContext(ctx context.Context) ([]*Process, error) { if err != nil { continue } - if int32(ppid) == p.Pid { + if ppid == int64(p.Pid) { np, err := NewProcessWithContext(ctx, int32(pid)) if err != nil { continue @@ -372,15 +372,7 @@ func (p *Process) ChildrenWithContext(ctx context.Context) ([]*Process, error) { func (p *Process) OpenFilesWithContext(ctx context.Context) ([]OpenFilesStat, error) { _, ofs, err := p.fillFromfdWithContext(ctx) - if err != nil { - return nil, err - } - ret := make([]OpenFilesStat, len(ofs)) - for i, o := range ofs { - ret[i] = *o - } - - return ret, nil + return ofs, err } func (p *Process) ConnectionsWithContext(ctx context.Context) ([]net.ConnectionStat, error) { @@ -629,17 +621,17 @@ func (p *Process) fillFromfdListWithContext(ctx context.Context) (string, []stri } // Get num_fds from /proc/(pid)/fd -func (p *Process) fillFromfdWithContext(ctx context.Context) (int32, []*OpenFilesStat, error) { +func (p *Process) fillFromfdWithContext(ctx context.Context) (int32, []OpenFilesStat, error) { statPath, fnames, err := p.fillFromfdListWithContext(ctx) if err != nil { return 0, nil, err } numFDs := int32(len(fnames)) - var openfiles []*OpenFilesStat + openfiles := make([]OpenFilesStat, 0, numFDs) for _, fd := range fnames { fpath := filepath.Join(statPath, fd) - filepath, err := os.Readlink(fpath) + path, err := common.Readlink(fpath) if err != nil { continue } @@ -647,8 +639,8 @@ func (p *Process) fillFromfdWithContext(ctx context.Context) (int32, []*OpenFile if err != nil { return numFDs, openfiles, err } - o := &OpenFilesStat{ - Path: filepath, + o := OpenFilesStat{ + Path: path, Fd: t, } openfiles = append(openfiles, o) 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 5a6d361dbf..063ff20ca2 100644 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go +++ b/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go @@ -358,7 +358,7 @@ func (p *Process) getKProc() (*KinfoProc, error) { return &k, nil } -func callKernProcSyscall(op int32, arg int32) ([]byte, uint64, error) { +func callKernProcSyscall(op, arg int32) ([]byte, uint64, error) { mib := []int32{CTLKern, KernProc, op, arg, sizeOfKinfoProc, 0} mibptr := unsafe.Pointer(&mib[0]) miblen := uint64(len(mib)) diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_posix.go b/vendor/github.com/shirou/gopsutil/v4/process/process_posix.go index 12d5fe2555..9fe55b490e 100644 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_posix.go +++ b/vendor/github.com/shirou/gopsutil/v4/process/process_posix.go @@ -67,7 +67,8 @@ func getTerminalMap() (map[uint64]string, error) { for _, name := range termfiles { stat := unix.Stat_t{} - if err = unix.Stat(name, &stat); err != nil { + err = unix.Stat(name, &stat) + if err != nil { return nil, err } rdev := uint64(stat.Rdev) diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_windows.go b/vendor/github.com/shirou/gopsutil/v4/process/process_windows.go index 6142abcafd..b4748d38e7 100644 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_windows.go +++ b/vendor/github.com/shirou/gopsutil/v4/process/process_windows.go @@ -882,7 +882,8 @@ func getFromSnapProcess(pid int32) (int32, int32, string, error) { //nolint:unpa defer windows.CloseHandle(snap) var pe32 windows.ProcessEntry32 pe32.Size = uint32(unsafe.Sizeof(pe32)) - if err = windows.Process32First(snap, &pe32); err != nil { + err = windows.Process32First(snap, &pe32) + if err != nil { return 0, 0, "", err } for { diff --git a/vendor/modules.txt b/vendor/modules.txt index d0580da677..b8706a75ee 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -829,7 +829,7 @@ github.com/secure-systems-lab/go-securesystemslib/encrypted # github.com/segmentio/ksuid v1.0.4 ## explicit; go 1.12 github.com/segmentio/ksuid -# github.com/shirou/gopsutil/v4 v4.25.5 +# github.com/shirou/gopsutil/v4 v4.25.6 ## explicit; go 1.23 github.com/shirou/gopsutil/v4/common github.com/shirou/gopsutil/v4/cpu