remove confusing flexibility for metadata interpretation

This commit is contained in:
David Eads
2018-04-23 10:23:01 -04:00
parent 9b7439d77d
commit 0710f72c65
34 changed files with 113 additions and 165 deletions

View File

@@ -970,11 +970,11 @@ func (c *allClient) destroy(obj runtime.Object, mapping *meta.RESTMapping) error
return err
}
namespaced := mapping.Scope.Name() == meta.RESTScopeNameNamespace
name, err := mapping.MetadataAccessor.Name(obj)
name, err := meta.NewAccessor().Name(obj)
if err != nil {
return err
}
ns, err := mapping.MetadataAccessor.Namespace(obj)
ns, err := meta.NewAccessor().Namespace(obj)
if err != nil {
return err
}