Merge pull request #105608 from yxxhero/reduce_code

reduce code for NewSchedulerCommand func
This commit is contained in:
Kubernetes Prow Robot
2021-10-11 23:23:46 -07:00
committed by GitHub

View File

@@ -83,10 +83,7 @@ for more information about scheduling and the kube-scheduler component.`,
if err := opts.Complete(&namedFlagSets); err != nil { if err := opts.Complete(&namedFlagSets); err != nil {
return err return err
} }
if err := runCommand(cmd, opts, registryOptions...); err != nil { return runCommand(cmd, opts, registryOptions...)
return err
}
return nil
}, },
Args: func(cmd *cobra.Command, args []string) error { Args: func(cmd *cobra.Command, args []string) error {
for _, arg := range args { for _, arg := range args {