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:
parent
75a0305a8c
commit
07b39b4b1f
|
@ -115,6 +115,9 @@ func (o *CommandCordonOption) Complete(args []string) error {
|
||||||
if len(args) == 0 {
|
if len(args) == 0 {
|
||||||
return errors.New("cluster name is required")
|
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]
|
o.ClusterName = args[0]
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue