summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-06-02 11:21:50 -0600
committermo khan <mo@mokhan.ca>2025-06-02 11:21:50 -0600
commit25bdce075df9b464abc69388c476b638aeb53e8b (patch)
tree96daa7defb0279a0fb792a1b220ceb0ff2b5393a
parent83825cdd870aef34edb96bf6a21a1fd57ff9b806 (diff)
chore: update modules
-rw-r--r--go.mod4
-rw-r--r--go.sum8
-rw-r--r--vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_arm64.go2
-rw-r--r--vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd.go2
-rw-r--r--vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd.go2
-rw-r--r--vendor/github.com/shirou/gopsutil/v4/cpu/cpu_solaris.go5
-rw-r--r--vendor/github.com/shirou/gopsutil/v4/cpu/cpu_windows.go88
-rw-r--r--vendor/github.com/shirou/gopsutil/v4/internal/common/common_darwin.go5
-rw-r--r--vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go15
-rw-r--r--vendor/github.com/shirou/gopsutil/v4/mem/mem_windows.go18
-rw-r--r--vendor/github.com/shirou/gopsutil/v4/net/net_darwin.go14
-rw-r--r--vendor/github.com/shirou/gopsutil/v4/net/net_openbsd.go2
-rw-r--r--vendor/github.com/shirou/gopsutil/v4/process/process_windows.go2
-rw-r--r--vendor/modules.txt4
14 files changed, 113 insertions, 58 deletions
diff --git a/go.mod b/go.mod
index c9dcaf4..f4065e9 100644
--- a/go.mod
+++ b/go.mod
@@ -4,7 +4,7 @@ go 1.24
require (
github.com/coreos/go-oidc/v3 v3.14.1
- github.com/docker/docker v28.2.1+incompatible
+ github.com/docker/docker v28.2.2+incompatible
github.com/docker/go-connections v0.5.0
github.com/envoyproxy/go-control-plane/envoy v1.32.4
github.com/oauth2-proxy/mockoidc v0.0.0-20240214162133-caebfff84d25
@@ -84,7 +84,7 @@ require (
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect
- github.com/shirou/gopsutil/v4 v4.25.4 // indirect
+ github.com/shirou/gopsutil/v4 v4.25.5 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect
github.com/tklauser/go-sysconf v0.3.15 // indirect
diff --git a/go.sum b/go.sum
index 72a05c6..b777ead 100644
--- a/go.sum
+++ b/go.sum
@@ -45,8 +45,8 @@ github.com/deckarep/golang-set/v2 v2.8.0 h1:swm0rlPCmdWn9mESxKOjWk8hXSqoxOp+Zlfu
github.com/deckarep/golang-set/v2 v2.8.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4=
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
-github.com/docker/docker v28.2.1+incompatible h1:aTSWVTDStpHbnRu0xBcGoJEjRf5EQKt6nik6Vif8sWw=
-github.com/docker/docker v28.2.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
+github.com/docker/docker v28.2.2+incompatible h1:CjwRSksz8Yo4+RmQ339Dp/D2tGO5JxwYeqtMOEe0LDw=
+github.com/docker/docker v28.2.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
@@ -170,8 +170,8 @@ github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY=
github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
-github.com/shirou/gopsutil/v4 v4.25.4 h1:cdtFO363VEOOFrUCjZRh4XVJkb548lyF0q0uTeMqYPw=
-github.com/shirou/gopsutil/v4 v4.25.4/go.mod h1:xbuxyoZj+UsgnZrENu3lQivsngRR5BdjbJwf2fv4szA=
+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/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE=
diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_arm64.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_arm64.go
index 0942700..8e69d7c 100644
--- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_arm64.go
+++ b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_arm64.go
@@ -51,7 +51,7 @@ func getFrequency() (float64, error) {
var pCoreHz uint32
for {
service := ioIteratorNext(iterator)
- if !(service > 0) {
+ if service <= 0 {
break
}
diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd.go
index cc76985..a1dc14d 100644
--- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd.go
+++ b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd.go
@@ -57,7 +57,7 @@ func TimesWithContext(_ context.Context, percpu bool) (ret []TimesStat, err erro
ncpu, err := unix.SysctlUint32("hw.ncpu")
if err != nil {
- return //nolint:nakedret //FIXME
+ return ret, err
}
var i uint32
diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd.go
index 9038a4d..4ab02d0 100644
--- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd.go
+++ b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd.go
@@ -75,7 +75,7 @@ func TimesWithContext(_ context.Context, percpu bool) (ret []TimesStat, err erro
ncpu, err := unix.SysctlUint32("hw.ncpu")
if err != nil {
- return //nolint:nakedret //FIXME
+ return ret, err
}
var i uint32
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 1911c0f..3dcea89 100644
--- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_solaris.go
+++ b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_solaris.go
@@ -159,10 +159,7 @@ func parseISAInfo(cmdOutput string) ([]string, error) {
return nil, errors.New("attempted to parse invalid isainfo output")
}
- flags := make([]string, len(words)-4)
- for i, val := range words[4:] { //nolint:gosimple //FIXME
- flags[i] = val
- }
+ flags := words[4:]
sort.Strings(flags)
return flags, nil
diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_windows.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_windows.go
index de86c04..3f4416b 100644
--- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_windows.go
+++ b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_windows.go
@@ -5,6 +5,7 @@ package cpu
import (
"context"
+ "errors"
"fmt"
"strconv"
"unsafe"
@@ -15,7 +16,10 @@ import (
"github.com/shirou/gopsutil/v4/internal/common"
)
-var procGetNativeSystemInfo = common.Modkernel32.NewProc("GetNativeSystemInfo")
+var (
+ procGetNativeSystemInfo = common.Modkernel32.NewProc("GetNativeSystemInfo")
+ procGetLogicalProcessorInformationEx = common.Modkernel32.NewProc("GetLogicalProcessorInformationEx")
+)
type win32_Processor struct { //nolint:revive //FIXME
Family uint16
@@ -67,12 +71,14 @@ func TimesWithContext(_ context.Context, percpu bool) ([]TimesStat, error) {
var lpIdleTime common.FILETIME
var lpKernelTime common.FILETIME
var lpUserTime common.FILETIME
- r, _, _ := common.ProcGetSystemTimes.Call(
+ // GetSystemTimes returns 0 for error, in which case we check err,
+ // see https://pkg.go.dev/golang.org/x/sys/windows#LazyProc.Call
+ r, _, err := common.ProcGetSystemTimes.Call(
uintptr(unsafe.Pointer(&lpIdleTime)),
uintptr(unsafe.Pointer(&lpKernelTime)),
uintptr(unsafe.Pointer(&lpUserTime)))
if r == 0 {
- return ret, windows.GetLastError()
+ return nil, err
}
LOT := float64(0.0000001)
@@ -200,13 +206,70 @@ type systemInfo struct {
wProcessorRevision uint16
}
-func CountsWithContext(ctx context.Context, logical bool) (int, error) {
+type groupAffinity struct {
+ mask uintptr // https://learn.microsoft.com/it-it/windows-hardware/drivers/kernel/interrupt-affinity-and-priority#about-kaffinity
+ group uint16
+ reserved [3]uint16
+}
+
+// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-processor_relationship
+type processorRelationship struct {
+ flags byte
+ efficientClass byte
+ reserved [20]byte
+ groupCount uint16
+ groupMask [1]groupAffinity
+}
+
+// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-system_logical_processor_information_ex
+type systemLogicalProcessorInformationEx struct {
+ Relationship uint32
+ Size uint32
+ Processor processorRelationship
+}
+
+func getPhysicalCoreCount() (int, error) {
+ var length uint32
+ const relationAll = 0xffff
+ const relationProcessorCore = 0x0
+
+ // First call to determine the required buffer size
+ _, _, err := procGetLogicalProcessorInformationEx.Call(uintptr(relationAll), 0, uintptr(unsafe.Pointer(&length)))
+ if err != nil && !errors.Is(err, windows.ERROR_INSUFFICIENT_BUFFER) {
+ return 0, fmt.Errorf("failed to get buffer size: %w", err)
+ }
+
+ // Allocate the buffer
+ buffer := make([]byte, length)
+
+ // Second call to retrieve the processor information
+ _, _, err = procGetLogicalProcessorInformationEx.Call(uintptr(relationAll), uintptr(unsafe.Pointer(&buffer[0])), uintptr(unsafe.Pointer(&length)))
+ if err != nil && !errors.Is(err, windows.NTE_OP_OK) {
+ return 0, fmt.Errorf("failed to get logical processor information: %w", err)
+ }
+
+ // Iterate through the buffer to count physical cores
+ offset := uintptr(0)
+ ncpus := 0
+ for offset < uintptr(length) {
+ info := (*systemLogicalProcessorInformationEx)(unsafe.Pointer(uintptr(unsafe.Pointer(&buffer[0])) + offset))
+ if info.Relationship == relationProcessorCore {
+ ncpus++
+ }
+ offset += uintptr(info.Size)
+ }
+
+ return ncpus, nil
+}
+
+func CountsWithContext(_ context.Context, logical bool) (int, error) {
if logical {
- // https://github.com/giampaolo/psutil/blob/d01a9eaa35a8aadf6c519839e987a49d8be2d891/psutil/_psutil_windows.c#L97
+ // Get logical processor count https://github.com/giampaolo/psutil/blob/d01a9eaa35a8aadf6c519839e987a49d8be2d891/psutil/_psutil_windows.c#L97
ret := windows.GetActiveProcessorCount(windows.ALL_PROCESSOR_GROUPS)
if ret != 0 {
return int(ret), nil
}
+
var systemInfo systemInfo
_, _, err := procGetNativeSystemInfo.Call(uintptr(unsafe.Pointer(&systemInfo)))
if systemInfo.dwNumberOfProcessors == 0 {
@@ -214,16 +277,7 @@ func CountsWithContext(ctx context.Context, logical bool) (int, error) {
}
return int(systemInfo.dwNumberOfProcessors), nil
}
- // physical cores https://github.com/giampaolo/psutil/blob/d01a9eaa35a8aadf6c519839e987a49d8be2d891/psutil/_psutil_windows.c#L499
- // for the time being, try with unreliable and slow WMI call…
- var dst []win32_Processor
- q := wmi.CreateQuery(&dst, "")
- if err := common.WMIQueryWithContext(ctx, q, &dst); err != nil {
- return 0, err
- }
- var count uint32
- for _, d := range dst {
- count += d.NumberOfCores
- }
- return int(count), nil
+
+ // Get physical core count https://github.com/giampaolo/psutil/blob/d01a9eaa35a8aadf6c519839e987a49d8be2d891/psutil/_psutil_windows.c#L499
+ return getPhysicalCoreCount()
}
diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_darwin.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/common_darwin.go
index afa780d..c9d6105 100644
--- a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_darwin.go
+++ b/vendor/github.com/shirou/gopsutil/v4/internal/common/common_darwin.go
@@ -393,10 +393,7 @@ func GoString(cStr *byte) string {
return ""
}
var length int
- for {
- if *(*byte)(unsafe.Add(unsafe.Pointer(cStr), uintptr(length))) == '\x00' {
- break
- }
+ for *(*byte)(unsafe.Add(unsafe.Pointer(cStr), uintptr(length))) != '\x00' {
length++
}
return string(unsafe.Slice(cStr, length))
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 5c49a47..2d21a80 100644
--- a/vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go
+++ b/vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go
@@ -5,8 +5,6 @@ package mem
import (
"unsafe"
-
- "golang.org/x/sys/windows"
)
// ExVirtualMemory represents Windows specific information
@@ -28,16 +26,21 @@ func NewExWindows() *ExWindows {
func (e *ExWindows) VirtualMemory() (*ExVirtualMemory, error) {
var memInfo memoryStatusEx
memInfo.cbSize = uint32(unsafe.Sizeof(memInfo))
- mem, _, _ := procGlobalMemoryStatusEx.Call(uintptr(unsafe.Pointer(&memInfo)))
+ // If mem == 0 since this is an error according to GlobalMemoryStatusEx documentation
+ // In that case, use err which is constructed from GetLastError(),
+ // see https://pkg.go.dev/golang.org/x/sys/windows#LazyProc.Call
+ mem, _, err := procGlobalMemoryStatusEx.Call(uintptr(unsafe.Pointer(&memInfo)))
if mem == 0 {
- return nil, windows.GetLastError()
+ return nil, err
}
var perfInfo performanceInformation
perfInfo.cb = uint32(unsafe.Sizeof(perfInfo))
- perf, _, _ := procGetPerformanceInfo.Call(uintptr(unsafe.Pointer(&perfInfo)), uintptr(perfInfo.cb))
+ // Analogous to above: perf == 0 is an error according to the GetPerformanceInfo documentation,
+ // use err in that case
+ perf, _, err := procGetPerformanceInfo.Call(uintptr(unsafe.Pointer(&perfInfo)), uintptr(perfInfo.cb))
if perf == 0 {
- return nil, windows.GetLastError()
+ return nil, err
}
ret := &ExVirtualMemory{
diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_windows.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_windows.go
index 015c1a1..f7421f6 100644
--- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_windows.go
+++ b/vendor/github.com/shirou/gopsutil/v4/mem/mem_windows.go
@@ -40,9 +40,11 @@ func VirtualMemory() (*VirtualMemoryStat, error) {
func VirtualMemoryWithContext(_ context.Context) (*VirtualMemoryStat, error) {
var memInfo memoryStatusEx
memInfo.cbSize = uint32(unsafe.Sizeof(memInfo))
- mem, _, _ := procGlobalMemoryStatusEx.Call(uintptr(unsafe.Pointer(&memInfo)))
+ // GlobalMemoryStatusEx returns 0 for error, in which case we check err,
+ // see https://pkg.go.dev/golang.org/x/sys/windows#LazyProc.Call
+ mem, _, err := procGlobalMemoryStatusEx.Call(uintptr(unsafe.Pointer(&memInfo)))
if mem == 0 {
- return nil, windows.GetLastError()
+ return nil, err
}
ret := &VirtualMemoryStat{
@@ -93,9 +95,11 @@ func SwapMemoryWithContext(_ context.Context) (*SwapMemoryStat, error) {
// Get total memory from performance information
var perfInfo performanceInformation
perfInfo.cb = uint32(unsafe.Sizeof(perfInfo))
- mem, _, _ := procGetPerformanceInfo.Call(uintptr(unsafe.Pointer(&perfInfo)), uintptr(perfInfo.cb))
+ // GetPerformanceInfo returns 0 for error, in which case we check err,
+ // see https://pkg.go.dev/golang.org/x/sys/windows#LazyProc.Call
+ mem, _, err := procGetPerformanceInfo.Call(uintptr(unsafe.Pointer(&perfInfo)), uintptr(perfInfo.cb))
if mem == 0 {
- return nil, windows.GetLastError()
+ return nil, err
}
totalPhys := perfInfo.physicalTotal * perfInfo.pageSize
totalSys := perfInfo.commitLimit * perfInfo.pageSize
@@ -161,9 +165,11 @@ func SwapDevicesWithContext(_ context.Context) ([]*SwapDevice, error) {
// the following system call invokes the supplied callback function once for each page file before returning
// see https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-enumpagefilesw
var swapDevices []*SwapDevice
- result, _, _ := procEnumPageFilesW.Call(windows.NewCallback(pEnumPageFileCallbackW), uintptr(unsafe.Pointer(&swapDevices)))
+ // EnumPageFilesW returns 0 for error, in which case we check err,
+ // see https://pkg.go.dev/golang.org/x/sys/windows#LazyProc.Call
+ result, _, err := procEnumPageFilesW.Call(windows.NewCallback(pEnumPageFileCallbackW), uintptr(unsafe.Pointer(&swapDevices)))
if result == 0 {
- return nil, windows.GetLastError()
+ return nil, err
}
return swapDevices, nil
diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_darwin.go b/vendor/github.com/shirou/gopsutil/v4/net/net_darwin.go
index 5814a54..c47e0c3 100644
--- a/vendor/github.com/shirou/gopsutil/v4/net/net_darwin.go
+++ b/vendor/github.com/shirou/gopsutil/v4/net/net_darwin.go
@@ -16,7 +16,7 @@ import (
)
var (
- errNetstatHeader = errors.New("Can't parse header of netstat output")
+ errNetstatHeader = errors.New("can't parse header of netstat output")
netstatLinkRegexp = regexp.MustCompile(`^<Link#(\d+)>$`)
)
@@ -29,15 +29,14 @@ func parseNetstatLine(line string) (stat *IOCountersStat, linkID *uint, err erro
)
if columns[0] == "Name" {
- err = errNetstatHeader
- return //nolint:nakedret //FIXME
+ return nil, nil, errNetstatHeader
}
// try to extract the numeric value from <Link#123>
if subMatch := netstatLinkRegexp.FindStringSubmatch(columns[2]); len(subMatch) == 2 {
numericValue, err = strconv.ParseUint(subMatch[1], 10, 64)
if err != nil {
- return //nolint:nakedret //FIXME
+ return nil, nil, err
}
linkIDUint := uint(numericValue)
linkID = &linkIDUint
@@ -50,8 +49,7 @@ func parseNetstatLine(line string) (stat *IOCountersStat, linkID *uint, err erro
base = 0
}
if numberColumns < 11 || numberColumns > 13 {
- err = fmt.Errorf("Line %q do have an invalid number of columns %d", line, numberColumns)
- return //nolint:nakedret //FIXME
+ return nil, nil, fmt.Errorf("line %q do have an invalid number of columns %d", line, numberColumns)
}
parsed := make([]uint64, 0, 7)
@@ -74,7 +72,7 @@ func parseNetstatLine(line string) (stat *IOCountersStat, linkID *uint, err erro
}
if numericValue, err = strconv.ParseUint(target, 10, 64); err != nil {
- return //nolint:nakedret //FIXME
+ return nil, nil, err
}
parsed = append(parsed, numericValue)
}
@@ -91,7 +89,7 @@ func parseNetstatLine(line string) (stat *IOCountersStat, linkID *uint, err erro
if len(parsed) == 7 {
stat.Dropout = parsed[6]
}
- return //nolint:nakedret //FIXME
+ return stat, linkID, nil
}
type netstatInterface struct {
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 41f0f46..481a276 100644
--- a/vendor/github.com/shirou/gopsutil/v4/net/net_openbsd.go
+++ b/vendor/github.com/shirou/gopsutil/v4/net/net_openbsd.go
@@ -296,7 +296,7 @@ func ConnectionsWithContext(ctx context.Context, kind string) ([]ConnectionStat,
}
lines := strings.Split(string(out), "\n")
for _, line := range lines {
- if !(strings.HasPrefix(line, "tcp") || strings.HasPrefix(line, "udp")) {
+ if !strings.HasPrefix(line, "tcp") && !strings.HasPrefix(line, "udp") {
continue
}
n, err := parseNetstatLine(line)
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 c6069a5..6142abc 100644
--- a/vendor/github.com/shirou/gopsutil/v4/process/process_windows.go
+++ b/vendor/github.com/shirou/gopsutil/v4/process/process_windows.go
@@ -594,7 +594,7 @@ func (p *Process) NumThreadsWithContext(_ context.Context) (int32, error) {
// if no errors and not cached already, cache ppid
p.parent = ppid
- if 0 == p.getPpid() {
+ if p.getPpid() == 0 {
p.setPpid(ppid)
}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index ebaf2fa..4cd31ee 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -83,7 +83,7 @@ github.com/deckarep/golang-set/v2
# github.com/distribution/reference v0.6.0
## explicit; go 1.20
github.com/distribution/reference
-# github.com/docker/docker v28.2.1+incompatible
+# github.com/docker/docker v28.2.2+incompatible
## explicit
github.com/docker/docker/api
github.com/docker/docker/api/types
@@ -361,7 +361,7 @@ github.com/rs/zerolog/internal/json
# github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
## explicit; go 1.13
github.com/sabhiram/go-gitignore
-# github.com/shirou/gopsutil/v4 v4.25.4
+# github.com/shirou/gopsutil/v4 v4.25.5
## explicit; go 1.23
github.com/shirou/gopsutil/v4/common
github.com/shirou/gopsutil/v4/cpu