mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
fix some missing errors return statements
Signed-off-by: haoshuwei <haoshuwei24@gmail.com>
This commit is contained in:
parent
1cdd0848ee
commit
c4fe8f11b2
@ -90,6 +90,9 @@ func (s *DryRunnableStorage) GuaranteedUpdate(
|
||||
return err
|
||||
}
|
||||
rev, err := s.Versioner().ObjectResourceVersion(ptrToType)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
out, _, err := tryUpdate(ptrToType, storage.ResponseMeta{ResourceVersion: rev})
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -251,6 +251,9 @@ func (o *ApplyOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error {
|
||||
|
||||
o.OpenAPISchema, _ = f.OpenAPISchema()
|
||||
o.Validator, err = f.Validator(cmdutil.GetFlagBool(cmd, "validate"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
o.Builder = f.NewBuilder()
|
||||
o.Mapper, err = f.ToRESTMapper()
|
||||
if err != nil {
|
||||
|
@ -182,6 +182,9 @@ func (o *LabelOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []st
|
||||
}
|
||||
o.resources = resources
|
||||
o.newLabels, o.removeLabels, err = parseLabels(labelArgs)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if o.list && len(o.outputFormat) > 0 {
|
||||
return fmt.Errorf("--list and --output may not be specified together")
|
||||
|
Loading…
Reference in New Issue
Block a user