mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user