1
0
Fork 0
mirror of https://github.com/kyverno/policy-reporter.git synced 2024-12-14 11:57:32 +00:00
policy-reporter/pkg/helper/utils.go
Frank Jogeleit dd150ee3b6
ID Generation (#428)
Signed-off-by: Frank Jogeleit <frank.jogeleit@lovoo.com>
2024-05-02 12:22:59 +02:00

21 lines
270 B
Go

package helper
import "strings"
func Contains(source string, sources []string) bool {
for _, s := range sources {
if strings.EqualFold(s, source) {
return true
}
}
return false
}
func Defaults(s, f string) string {
if s != "" {
return s
}
return f
}