Remove unstructured error checking from affected code

Also remove error messages that depended on ObjectKinds() - future
changes will potentially remove this interface and the replacements here
are equivalent.
This commit is contained in:
Clayton Coleman
2017-11-14 22:10:35 -05:00
parent e298aa39c3
commit 7563a0c4d8
9 changed files with 20 additions and 62 deletions

View File

@@ -308,10 +308,7 @@ func (o *LabelOptions) RunLabel(f cmdutil.Factory, cmd *cobra.Command) error {
if o.local {
mapper, _ = f.Object()
} else {
mapper, _, err = f.UnstructuredObject()
if err != nil {
return err
}
mapper, _ = f.UnstructuredObject()
}
if o.outputFormat != "" {
return f.PrintObject(cmd, o.local, mapper, outputObj, o.out)