Tweak explain messages and abstract client

This commit is contained in:
Clayton Coleman
2015-12-11 17:15:41 -05:00
parent 08c2cba266
commit 151b4e5958
5 changed files with 31 additions and 21 deletions

View File

@@ -91,6 +91,11 @@ func (e ShortcutExpander) ResourceIsValid(resource string) bool {
return e.RESTMapper.ResourceIsValid(expandResourceShortcut(resource))
}
// ResourceSingularizer expands the named resource and then singularizes it.
func (e ShortcutExpander) ResourceSingularizer(resource string) (string, error) {
return e.RESTMapper.ResourceSingularizer(expandResourceShortcut(resource))
}
// expandResourceShortcut will return the expanded version of resource
// (something that a pkg/api/meta.RESTMapper can understand), if it is
// indeed a shortcut. Otherwise, will return resource unmodified.