mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdctl/ctlv3: fix spell errors
This commit is contained in:
@@ -60,7 +60,7 @@ func getDelOp(cmd *cobra.Command, args []string) (string, []clientv3.OpOption) {
|
||||
key := args[0]
|
||||
if len(args) > 1 {
|
||||
if delPrefix {
|
||||
ExitWithError(ExitBadArgs, fmt.Errorf("too many arguments, only accept one arguement when `--prefix` is set."))
|
||||
ExitWithError(ExitBadArgs, fmt.Errorf("too many arguments, only accept one argument when `--prefix` is set."))
|
||||
}
|
||||
opts = append(opts, clientv3.WithRange(args[1]))
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ func getGetOp(cmd *cobra.Command, args []string) (string, []clientv3.OpOption) {
|
||||
key := args[0]
|
||||
if len(args) > 1 {
|
||||
if getPrefix || getFromKey {
|
||||
ExitWithError(ExitBadArgs, fmt.Errorf("too many arguments, only accept one arguement when `--prefix` or `--from-key` is set."))
|
||||
ExitWithError(ExitBadArgs, fmt.Errorf("too many arguments, only accept one argument when `--prefix` or `--from-key` is set."))
|
||||
}
|
||||
opts = append(opts, clientv3.WithRange(args[1]))
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ func NewLockCommand() *cobra.Command {
|
||||
|
||||
func lockCommandFunc(cmd *cobra.Command, args []string) {
|
||||
if len(args) != 1 {
|
||||
ExitWithError(ExitBadArgs, errors.New("lock takes one lock name arguement."))
|
||||
ExitWithError(ExitBadArgs, errors.New("lock takes one lock name argument."))
|
||||
}
|
||||
c := mustClientFromCmd(cmd)
|
||||
if err := lockUntilSignal(c, args[0]); err != nil {
|
||||
|
||||
@@ -42,7 +42,7 @@ Insert '--' for workaround:
|
||||
$ put <key> -- <value>
|
||||
$ put -- <key> <value>
|
||||
|
||||
If <value> isn't given as command line arguement, this command tries to read the value from standard input.
|
||||
If <value> isn't given as command line argument, this command tries to read the value from standard input.
|
||||
For example,
|
||||
$ cat file | put <key>
|
||||
will store the content of the file to <key>.
|
||||
|
||||
Reference in New Issue
Block a user