mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-16 06:32:32 +00:00
Single-key matching behavior in generic.Matcher
This commit is contained in:
3
pkg/client/cache/store.go
vendored
3
pkg/client/cache/store.go
vendored
@@ -63,7 +63,8 @@ func (k KeyError) Error() string {
|
||||
|
||||
// MetaNamespaceKeyFunc is a convenient default KeyFunc which knows how to make
|
||||
// keys for API objects which implement meta.Interface.
|
||||
// The key uses the format: <namespace>/<name>
|
||||
// The key uses the format <namespace>/<name> unless <namespace> is empty, then
|
||||
// it's just <name>.
|
||||
func MetaNamespaceKeyFunc(obj interface{}) (string, error) {
|
||||
meta, err := meta.Accessor(obj)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user