From 13bae839b004eb009c702ba12ea8f858bfc98919 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Tue, 16 May 2023 14:16:04 +0300 Subject: [PATCH] docs: fix comment typos (#38) --- conn_test.go | 6 +++--- proxy.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conn_test.go b/conn_test.go index e9f5441..a229b72 100644 --- a/conn_test.go +++ b/conn_test.go @@ -47,7 +47,7 @@ func (a fakeAddr) String() string { return "str" } -// newTestConn creates a connnection backed by a fake network connection using +// newTestConn creates a connection backed by a fake network connection using // default values for buffering. func newTestConn(r io.Reader, w io.Writer, isServer bool) *Conn { return newConn(fakeNetConn{Reader: r, Writer: w}, isServer, 1024, 1024, nil, nil, nil) @@ -149,7 +149,7 @@ func TestFraming(t *testing.T) { } func TestControl(t *testing.T) { - const message = "this is a ping/pong messsage" + const message = "this is a ping/pong message" for _, isServer := range []bool{true, false} { for _, isWriteControl := range []bool{true, false} { name := fmt.Sprintf("s:%v, wc:%v", isServer, isWriteControl) @@ -440,7 +440,7 @@ func TestWriteAfterMessageWriterClose(t *testing.T) { w, _ := wc.NextWriter(BinaryMessage) io.WriteString(w, "hello") if err := w.Close(); err != nil { - t.Fatalf("unxpected error closing message writer, %v", err) + t.Fatalf("unexpected error closing message writer, %v", err) } if _, err := io.WriteString(w, "world"); err == nil { diff --git a/proxy.go b/proxy.go index e0f466b..e3cef9c 100644 --- a/proxy.go +++ b/proxy.go @@ -59,7 +59,7 @@ func (hpd *httpProxyDialer) Dial(network string, addr string) (net.Conn, error) return nil, err } - // Read response. It's OK to use and discard buffered reader here becaue + // Read response. It's OK to use and discard buffered reader here because // the remote server does not speak until spoken to. br := bufio.NewReader(conn) resp, err := http.ReadResponse(br, connectReq)