mirror of
https://github.com/containers/podman.git
synced 2025-12-04 04:09:40 +08:00
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:
17
vendor/github.com/shirou/gopsutil/v4/internal/common/common.go
generated
vendored
17
vendor/github.com/shirou/gopsutil/v4/internal/common/common.go
generated
vendored
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user