Merge pull request #4212 from gyuho/typo_packages

*: fix minor typos
This commit is contained in:
Jonathan Boulle 2016-01-14 13:29:52 +01:00
commit ec0877b239
8 changed files with 8 additions and 8 deletions

View File

@ -56,7 +56,7 @@ func NewLeaseCreateCommand() *cobra.Command {
// leaseCreateCommandFunc executes the "lease create" command. // leaseCreateCommandFunc executes the "lease create" command.
func leaseCreateCommandFunc(cmd *cobra.Command, args []string) { func leaseCreateCommandFunc(cmd *cobra.Command, args []string) {
if len(args) != 1 { if len(args) != 1 {
ExitWithError(ExitBadArgs, fmt.Errorf("lease create command needs TTL arguement.")) ExitWithError(ExitBadArgs, fmt.Errorf("lease create command needs TTL argument."))
} }
ttl, err := strconv.ParseInt(args[0], 10, 64) ttl, err := strconv.ParseInt(args[0], 10, 64)

View File

@ -103,7 +103,7 @@ func TestV3PutOverwrite(t *testing.T) {
} }
} }
// TestV3DeleteRange tests various edge cases in teh DeleteRange API. // TestV3DeleteRange tests various edge cases in the DeleteRange API.
func TestV3DeleteRange(t *testing.T) { func TestV3DeleteRange(t *testing.T) {
tests := []struct { tests := []struct {
keySet []string keySet []string

View File

@ -150,7 +150,7 @@ func newLessor(lessorID uint8, b backend.Backend) *lessor {
l := &lessor{ l := &lessor{
leaseMap: make(map[LeaseID]*Lease), leaseMap: make(map[LeaseID]*Lease),
b: b, b: b,
// expiredC is a small buffered chan to avoid unncessary blocking. // expiredC is a small buffered chan to avoid unnecessary blocking.
expiredC: make(chan []*Lease, 16), expiredC: make(chan []*Lease, 16),
stopC: make(chan struct{}), stopC: make(chan struct{}),
doneC: make(chan struct{}), doneC: make(chan struct{}),

View File

@ -28,7 +28,7 @@ func NewTimeoutTransport(info TLSInfo, dialtimeoutd, rdtimeoutd, wtimeoutd time.
if err != nil { if err != nil {
return nil, err return nil, err
} }
// the timeouted connection will tiemout soon after it is idle. // the timeouted connection will timeout soon after it is idle.
// it should not be put back to http transport as an idle connection for future usage. // it should not be put back to http transport as an idle connection for future usage.
tr.MaxIdleConnsPerHost = -1 tr.MaxIdleConnsPerHost = -1
tr.Dial = (&rwTimeoutDialer{ tr.Dial = (&rwTimeoutDialer{

View File

@ -36,7 +36,7 @@ const (
// msgappv2 stream sends three types of message: linkHeartbeatMessage, // msgappv2 stream sends three types of message: linkHeartbeatMessage,
// AppEntries and MsgApp. AppEntries is the MsgApp that is sent in // AppEntries and MsgApp. AppEntries is the MsgApp that is sent in
// replicate state in raft, whose index and term are fully predicatable. // replicate state in raft, whose index and term are fully predictable.
// //
// Data format of linkHeartbeatMessage: // Data format of linkHeartbeatMessage:
// | offset | bytes | description | // | offset | bytes | description |

View File

@ -137,7 +137,7 @@ func TestPipelinePost(t *testing.T) {
picker := mustNewURLPicker(t, []string{"http://localhost:2380"}) picker := mustNewURLPicker(t, []string{"http://localhost:2380"})
p := newPipeline(tr, picker, types.ID(2), types.ID(1), types.ID(1), newPeerStatus(types.ID(1)), nil, &fakeRaft{}, nil) p := newPipeline(tr, picker, types.ID(2), types.ID(1), types.ID(1), newPeerStatus(types.ID(1)), nil, &fakeRaft{}, nil)
if err := p.post([]byte("some data")); err != nil { if err := p.post([]byte("some data")); err != nil {
t.Fatalf("unexpect post error: %v", err) t.Fatalf("unexpected post error: %v", err)
} }
p.stop() p.stop()