mirror of
https://github.com/kyverno/policy-reporter.git
synced 2024-12-14 11:57:32 +00:00
dd150ee3b6
Signed-off-by: Frank Jogeleit <frank.jogeleit@lovoo.com>
21 lines
270 B
Go
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
|
|
}
|