Add args greater than one

Signed-off-by: yipping.luo <yinping.luo@daocloud.io>

fix error message

Signed-off-by: yipping.luo <yinping.luo@daocloud.io>

rebase
This commit is contained in:
yipping.luo 2022-10-07 21:17:30 +08:00
parent 75a0305a8c
commit 07b39b4b1f
1 changed files with 3 additions and 0 deletions

View File

@ -115,6 +115,9 @@ func (o *CommandCordonOption) Complete(args []string) error {
if len(args) == 0 {
return errors.New("cluster name is required")
}
if len(args) > 1 {
return errors.New("more than one cluster name is not supported")
}
o.ClusterName = args[0]
return nil
}