Ver código fonte

*: fix typos vaild->valid

Xiang Li 10 anos atrás
pai
commit
845c51fedd

+ 1 - 1
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;
 }
 

+ 1 - 1
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"},
 		},

+ 1 - 1
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"`
 }
 

+ 1 - 1
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;
 }
 

+ 1 - 1
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 }

+ 1 - 1
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())

+ 3 - 3
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.