1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 18:06:55 +00:00
kyverno/test/e2e/framework/utils/named.go

15 lines
207 B
Go
Raw Normal View History

package utils
type Named interface {
GetNamespace() string
GetName() string
}
func Key(obj Named) string {
n, ns := obj.GetName(), obj.GetNamespace()
if ns == "" {
return n
}
return ns + "/" + n
}