From 845c51feddf5f74eabdb5357456aa863e71070e8 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Fri, 7 Aug 2015 10:57:11 -0700 Subject: [PATCH] *: fix typos vaild->valid --- Documentation/rfc/v3api.proto | 2 +- etcdctl/command/import_snap_command.go | 2 +- etcdserver/etcdserverpb/rpc.pb.go | 2 +- etcdserver/etcdserverpb/rpc.proto | 2 +- etcdserver/server_test.go | 2 +- raft/raft_flow_control_test.go | 2 +- rafthttp/transport.go | 6 +++--- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Documentation/rfc/v3api.proto b/Documentation/rfc/v3api.proto index bd7311fa9..2aaa4f66e 100644 --- a/Documentation/rfc/v3api.proto +++ b/Documentation/rfc/v3api.proto @@ -69,7 +69,7 @@ message RangeRequest { // limit the number of keys returned. optional int64 limit = 3; // the response will be consistent with previous request with same token if the token is - // given and is vaild. + // given and is valid. optional bytes consistent_token = 4; } diff --git a/etcdctl/command/import_snap_command.go b/etcdctl/command/import_snap_command.go index b0f165336..bd3f334fb 100644 --- a/etcdctl/command/import_snap_command.go +++ b/etcdctl/command/import_snap_command.go @@ -25,7 +25,7 @@ func NewImportSnapCommand() cli.Command { Name: "import", Usage: "import a snapshot to a cluster", Flags: []cli.Flag{ - cli.StringFlag{Name: "snap", Value: "", Usage: "Path to the vaild etcd 0.4.x snapshot."}, + cli.StringFlag{Name: "snap", Value: "", Usage: "Path to the valid etcd 0.4.x snapshot."}, cli.StringSliceFlag{Name: "hidden", Value: new(cli.StringSlice), Usage: "Hidden key spaces to import from snapshot"}, cli.IntFlag{Name: "c", Value: 10, Usage: "Number of concurrent clients to import the data"}, }, diff --git a/etcdserver/etcdserverpb/rpc.pb.go b/etcdserver/etcdserverpb/rpc.pb.go index 3b69e2b1d..b55603716 100644 --- a/etcdserver/etcdserverpb/rpc.pb.go +++ b/etcdserver/etcdserverpb/rpc.pb.go @@ -70,7 +70,7 @@ type RangeRequest struct { // limit the number of keys returned. Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` // the response will be consistent with previous request with same token if the token is - // given and is vaild. + // given and is valid. ConsistentToken []byte `protobuf:"bytes,4,opt,name=consistent_token,proto3" json:"consistent_token,omitempty"` } diff --git a/etcdserver/etcdserverpb/rpc.proto b/etcdserver/etcdserverpb/rpc.proto index a106d19d3..4c6bffecf 100644 --- a/etcdserver/etcdserverpb/rpc.proto +++ b/etcdserver/etcdserverpb/rpc.proto @@ -48,7 +48,7 @@ message RangeRequest { // limit the number of keys returned. int64 limit = 3; // the response will be consistent with previous request with same token if the token is - // given and is vaild. + // given and is valid. bytes consistent_token = 4; } diff --git a/etcdserver/server_test.go b/etcdserver/server_test.go index a19d8730f..d9d93ba5c 100644 --- a/etcdserver/server_test.go +++ b/etcdserver/server_test.go @@ -1146,7 +1146,7 @@ func TestGetOtherPeerURLs(t *testing.T) { // storeRecorder records all the methods it receives. // storeRecorder DOES NOT work as a actual store. -// It always returns invaild empty response and no error. +// It always returns invalid empty response and no error. type storeRecorder struct{ testutil.Recorder } func (s *storeRecorder) Version() int { return 0 } diff --git a/raft/raft_flow_control_test.go b/raft/raft_flow_control_test.go index 6be4c1635..947f29752 100644 --- a/raft/raft_flow_control_test.go +++ b/raft/raft_flow_control_test.go @@ -57,7 +57,7 @@ func TestMsgAppFlowControlFull(t *testing.T) { // TestMsgAppFlowControlMoveForward ensures msgAppResp can move // forward the sending window correctly: -// 1. vaild msgAppResp.index moves the windows to pass all smaller or equal index. +// 1. valid msgAppResp.index moves the windows to pass all smaller or equal index. // 2. out-of-dated msgAppResp has no effect on the silding window. func TestMsgAppFlowControlMoveForward(t *testing.T) { r := newTestRaft(1, []uint64{1, 2}, 5, 1, NewMemoryStorage()) diff --git a/rafthttp/transport.go b/rafthttp/transport.go index b70f4018b..31815a222 100644 --- a/rafthttp/transport.go +++ b/rafthttp/transport.go @@ -52,11 +52,11 @@ type Transporter interface { // AddRemote adds a remote with given peer urls into the transport. // A remote helps newly joined member to catch up the progress of cluster, // and will not be used after that. - // It is the caller's responsibility to ensure the urls are all vaild, + // It is the caller's responsibility to ensure the urls are all valid, // or it panics. AddRemote(id types.ID, urls []string) // AddPeer adds a peer with given peer urls into the transport. - // It is the caller's responsibility to ensure the urls are all vaild, + // It is the caller's responsibility to ensure the urls are all valid, // or it panics. // Peer urls are used to connect to the remote peer. AddPeer(id types.ID, urls []string) @@ -65,7 +65,7 @@ type Transporter interface { // RemoveAllPeers removes all the existing peers in the transport. RemoveAllPeers() // UpdatePeer updates the peer urls of the peer with the given id. - // It is the caller's responsibility to ensure the urls are all vaild, + // It is the caller's responsibility to ensure the urls are all valid, // or it panics. UpdatePeer(id types.ID, urls []string) // Stop closes the connections and stops the transporter.