You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
k3s/pkg/agent/util/strings.go

15 lines
320 B

package util
import "strings"
// HasSuffixI returns true if string s has any of the given suffixes, ignoring case.
func HasSuffixI(s string, suffixes ...string) bool {
s = strings.ToLower(s)
for _, suffix := range suffixes {
if strings.HasSuffix(s, strings.ToLower(suffix)) {
return true
}
}
return false
}