mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-08-22 05:36:27 +00:00
Fix Grype CVEs: update logrus and prometheus/prometheus
- Update github.com/sirupsen/logrus v1.9.0 -> v1.9.3 in test/go.mod to fix GHSA-4f99-4q7p-p3gh (High) - Update github.com/prometheus/prometheus v0.35.0 -> v0.311.3 to fix GHSA-vffh-x6r8-xx99 (Medium) - Run go mod tidy and go mod vendor to update vendor directory
This commit is contained in:
committed by
Ciprian Hacman
parent
255c6e602c
commit
97bb2fbb44
+23
@@ -0,0 +1,23 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package stringutils
|
||||
|
||||
import (
|
||||
"slices"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// ContainsStrings searches a slice of strings for a case-sensitive match
|
||||
//
|
||||
// Now equivalent to the standard library [slice.Contains].
|
||||
func ContainsStrings(coll []string, item string) bool {
|
||||
return slices.Contains(coll, item)
|
||||
}
|
||||
|
||||
// ContainsStringsCI searches a slice of strings for a case-insensitive match
|
||||
func ContainsStringsCI(coll []string, item string) bool {
|
||||
return slices.ContainsFunc(coll, func(e string) bool {
|
||||
return strings.EqualFold(e, item)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user