From 15257122140c9e69bb537123e36294c66b255740 Mon Sep 17 00:00:00 2001 From: DuckSoft Date: Fri, 17 Jul 2020 18:09:24 +0800 Subject: [PATCH] some typo fixes note: there are other typos in external/ folder. considering the fact that the folder "will be removed in future", I skipped those typos. --- common/buf/buffer_test.go | 2 +- common/mux/server.go | 2 +- features/stats/stats.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/buf/buffer_test.go b/common/buf/buffer_test.go index 6231e449f..34961c8f6 100644 --- a/common/buf/buffer_test.go +++ b/common/buf/buffer_test.go @@ -22,7 +22,7 @@ func TestBufferClear(t *testing.T) { buffer.Clear() if buffer.Len() != 0 { - t.Error("expect 0 lenght, but got ", buffer.Len()) + t.Error("expect 0 length, but got ", buffer.Len()) } } diff --git a/common/mux/server.go b/common/mux/server.go index 48c4a23a0..8985bdd73 100644 --- a/common/mux/server.go +++ b/common/mux/server.go @@ -35,7 +35,7 @@ func (s *Server) Type() interface{} { return s.dispatcher.Type() } -// Dispatch impliments routing.Dispatcher +// Dispatch implements routing.Dispatcher func (s *Server) Dispatch(ctx context.Context, dest net.Destination) (*transport.Link, error) { if dest.Address != muxCoolAddress { return s.dispatcher.Dispatch(ctx, dest) diff --git a/features/stats/stats.go b/features/stats/stats.go index fed80eb83..b6d99620f 100644 --- a/features/stats/stats.go +++ b/features/stats/stats.go @@ -22,7 +22,7 @@ type Counter interface { type Manager interface { features.Feature - // RegisterCounter registers a new counter to the manager. The identifier string must not be emtpy, and unique among other counters. + // RegisterCounter registers a new counter to the manager. The identifier string must not be empty, and unique among other counters. RegisterCounter(string) (Counter, error) // GetCounter returns a counter by its identifier. GetCounter(string) Counter