diff --git a/etcdctl/ctlv3/command/del_command.go b/etcdctl/ctlv3/command/del_command.go index ceeeb8d74..5952b11b6 100644 --- a/etcdctl/ctlv3/command/del_command.go +++ b/etcdctl/ctlv3/command/del_command.go @@ -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])) } diff --git a/etcdctl/ctlv3/command/get_command.go b/etcdctl/ctlv3/command/get_command.go index 86feedc6a..e0257b9de 100644 --- a/etcdctl/ctlv3/command/get_command.go +++ b/etcdctl/ctlv3/command/get_command.go @@ -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])) } diff --git a/etcdctl/ctlv3/command/lock_command.go b/etcdctl/ctlv3/command/lock_command.go index 42583cb6c..e2c137db7 100644 --- a/etcdctl/ctlv3/command/lock_command.go +++ b/etcdctl/ctlv3/command/lock_command.go @@ -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 { diff --git a/etcdctl/ctlv3/command/put_command.go b/etcdctl/ctlv3/command/put_command.go index 0e582d4dd..b964ea036 100644 --- a/etcdctl/ctlv3/command/put_command.go +++ b/etcdctl/ctlv3/command/put_command.go @@ -42,7 +42,7 @@ Insert '--' for workaround: $ put -- $ put -- -If isn't given as command line arguement, this command tries to read the value from standard input. +If isn't given as command line argument, this command tries to read the value from standard input. For example, $ cat file | put will store the content of the file to . diff --git a/etcdserver/api/v3rpc/watch.go b/etcdserver/api/v3rpc/watch.go index fbf8f06a6..c7fb97b6d 100644 --- a/etcdserver/api/v3rpc/watch.go +++ b/etcdserver/api/v3rpc/watch.go @@ -92,7 +92,7 @@ type serverWatchStream struct { mu sync.Mutex // progress tracks the watchID that stream might need to send // progress to. - // TOOD: combine progress and prevKV into a single struct? + // TODO: combine progress and prevKV into a single struct? progress map[mvcc.WatchID]bool prevKV map[mvcc.WatchID]bool diff --git a/etcdserver/v3_server.go b/etcdserver/v3_server.go index 70eed3179..e044dbe9d 100644 --- a/etcdserver/v3_server.go +++ b/etcdserver/v3_server.go @@ -39,7 +39,7 @@ const ( maxV3RequestTimeout = 5 * time.Second // In the health case, there might be a small gap (10s of entries) between - // the applied index and commited index. + // the applied index and committed index. // However, if the committed entries are very heavy to apply, the gap might grow. // We should stop accepting new proposals if the gap growing to a certain point. maxGapBetweenApplyAndCommitIndex = 1000 diff --git a/proxy/grpcproxy/watcher_groups.go b/proxy/grpcproxy/watcher_groups.go index 514b5b44d..eef879d57 100644 --- a/proxy/grpcproxy/watcher_groups.go +++ b/proxy/grpcproxy/watcher_groups.go @@ -72,10 +72,10 @@ func (wgs *watchergroups) maybeJoinWatcherSingle(rid receiverID, ws watcherSingl wgs.mu.Lock() defer wgs.mu.Unlock() - gropu, ok := wgs.groups[ws.w.wr] + group, ok := wgs.groups[ws.w.wr] if ok { - if ws.w.rev >= gropu.rev { - gropu.add(receiverID{streamID: ws.sws.id, watcherID: ws.w.id}, ws.w) + if ws.w.rev >= group.rev { + group.add(receiverID{streamID: ws.sws.id, watcherID: ws.w.id}, ws.w) return true } return false