mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
reduce code for NewSchedulerCommand func
Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
parent
0ac956ff2b
commit
71a6bb3301
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user