fix(deps): update module github.com/shirou/gopsutil/v4 to v4.25.9

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2025-10-01 03:30:56 +00:00
committed by GitHub
parent 3747e3db3f
commit 3b509022cd
63 changed files with 11415 additions and 6170 deletions

View File

@@ -23,6 +23,7 @@ import (
"path/filepath"
"reflect"
"runtime"
"slices"
"strconv"
"strings"
"time"
@@ -290,22 +291,14 @@ func StringsHas(target []string, src string) bool {
// StringsContains checks the src in any string of the target string slice
func StringsContains(target []string, src string) bool {
for _, t := range target {
if strings.Contains(t, src) {
return true
}
}
return false
return slices.ContainsFunc(target, func(s string) bool {
return strings.Contains(s, src)
})
}
// IntContains checks the src in any int of the target int slice.
func IntContains(target []int, src int) bool {
for _, t := range target {
if src == t {
return true
}
}
return false
return slices.Contains(target, src)
}
// get struct attributes.