make RESTMapper.KindFor

This commit is contained in:
deads2k
2015-11-16 15:14:27 -05:00
parent 581a1ad1af
commit 5c4fb5bcbe
11 changed files with 41 additions and 69 deletions

View File

@@ -82,13 +82,13 @@ func RunExplain(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []st
}
// TODO: We should deduce the group for a resource by discovering the supported resources at server.
group, err := mapper.GroupForResource(inModel)
gvk, err := mapper.KindFor(inModel)
if err != nil {
return err
}
if len(apiV) == 0 {
groupMeta, err := latest.Group(group)
groupMeta, err := latest.Group(gvk.Group)
if err != nil {
return err
}