From 67865906a4ef908acf0323969d59688916e59173 Mon Sep 17 00:00:00 2001 From: hakusai22 Date: Mon, 6 May 2024 11:05:28 +0800 Subject: [PATCH] fix: _typos.toml and some typos (#327) --- _typos.toml | 10 ++++++++++ connection_test.go | 4 ++-- net_dialer.go | 2 +- netpoll_test.go | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 _typos.toml diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 00000000..b4b3d5bd --- /dev/null +++ b/_typos.toml @@ -0,0 +1,10 @@ +# Typo check: https://github.com/crate-ci/typos + +[files] +extend-exclude = ["go.sum"] + +[default.extend-identifiers] +# *sigh* this just isn't worth the cost of fixing +nd = "nd" +paniced = "paniced" +write_datas = "write_datas" diff --git a/connection_test.go b/connection_test.go index 548d98a2..f79b2484 100644 --- a/connection_test.go +++ b/connection_test.go @@ -601,7 +601,7 @@ func TestConnectionServerClose(t *testing.T) { go func() { err := el.Serve(ln) if err != nil { - t.Logf("servce end with error: %v", err) + t.Logf("service end with error: %v", err) } }() @@ -658,7 +658,7 @@ func TestConnectionDailTimeoutAndClose(t *testing.T) { go func() { err := el.Serve(ln) if err != nil { - t.Logf("servce end with error: %v", err) + t.Logf("service end with error: %v", err) } }() diff --git a/net_dialer.go b/net_dialer.go index 4c4e8dd2..f39245ff 100644 --- a/net_dialer.go +++ b/net_dialer.go @@ -54,7 +54,7 @@ func (d *dialer) DialConnection(network, address string, timeout time.Duration) switch network { case "tcp", "tcp4", "tcp6": return d.dialTCP(ctx, network, address) - // case "udp", "udp4", "udp6": // TODO: unsupport now + // case "udp", "udp4", "udp6": // TODO: unsupported now case "unix", "unixgram", "unixpacket": raddr := &UnixAddr{ UnixAddr: net.UnixAddr{Name: address, Net: network}, diff --git a/netpoll_test.go b/netpoll_test.go index b01f0a95..843be8cd 100644 --- a/netpoll_test.go +++ b/netpoll_test.go @@ -542,7 +542,7 @@ func TestServerAcceptWhenTooManyOpenFiles(t *testing.T) { }, WithOnConnect(func(ctx context.Context, connection Connection) context.Context { atomic.AddInt32(&connected, 1) - t.Logf("Conn[%s] accpeted", connection.RemoteAddr()) + t.Logf("Conn[%s] accepted", connection.RemoteAddr()) return ctx }), WithOnDisconnect(func(ctx context.Context, connection Connection) {