mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdctl: fix get command error when no arg provided
The current error is incorrect. Providing a similar one to the del command.
This commit is contained in:
parent
0a25f49d61
commit
7f001c1f00
@ -76,7 +76,7 @@ func getCommandFunc(cmd *cobra.Command, args []string) {
|
|||||||
|
|
||||||
func getGetOp(args []string) (string, []clientv3.OpOption) {
|
func getGetOp(args []string) (string, []clientv3.OpOption) {
|
||||||
if len(args) == 0 {
|
if len(args) == 0 {
|
||||||
ExitWithError(ExitBadArgs, fmt.Errorf("range command needs arguments."))
|
ExitWithError(ExitBadArgs, fmt.Errorf("get command needs one argument as key and an optional argument as range_end."))
|
||||||
}
|
}
|
||||||
|
|
||||||
if getPrefix && getFromKey {
|
if getPrefix && getFromKey {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user