Skip to content

Commit 85fb2d8

Browse files
szepeviktorjaitaiwan
authored andcommitted
Fix typos
1 parent 3810b23 commit 85fb2d8

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

client_server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ func TestNoUpgrade(t *testing.T) {
522522
}
523523
resp.Body.Close()
524524
if u := resp.Header.Get("Upgrade"); u != "websocket" {
525-
t.Errorf("Uprade response header is %q, want %q", u, "websocket")
525+
t.Errorf("Upgrade response header is %q, want %q", u, "websocket")
526526
}
527527
if resp.StatusCode != http.StatusUpgradeRequired {
528528
t.Errorf("Status = %d, want %d", resp.StatusCode, http.StatusUpgradeRequired)

conn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ func (c *Conn) PingHandler() func(appData string) error {
11641164
func (c *Conn) SetPingHandler(h func(appData string) error) {
11651165
if h == nil {
11661166
h = func(message string) error {
1167-
// Make a best effort to send the pong mesage.
1167+
// Make a best effort to send the pong message.
11681168
_ = c.WriteControl(PongMessage, []byte(message), time.Now().Add(writeWait))
11691169
return nil
11701170
}

conn_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (a fakeAddr) String() string {
4747
return "str"
4848
}
4949

50-
// newTestConn creates a connnection backed by a fake network connection using
50+
// newTestConn creates a connection backed by a fake network connection using
5151
// default values for buffering.
5252
func newTestConn(r io.Reader, w io.Writer, isServer bool) *Conn {
5353
return newConn(fakeNetConn{Reader: r, Writer: w}, isServer, 1024, 1024, nil, nil, nil)
@@ -149,7 +149,7 @@ func TestFraming(t *testing.T) {
149149
}
150150

151151
func TestControl(t *testing.T) {
152-
const message = "this is a ping/pong messsage"
152+
const message = "this is a ping/pong message"
153153
for _, isServer := range []bool{true, false} {
154154
for _, isWriteControl := range []bool{true, false} {
155155
name := fmt.Sprintf("s:%v, wc:%v", isServer, isWriteControl)
@@ -440,7 +440,7 @@ func TestWriteAfterMessageWriterClose(t *testing.T) {
440440
w, _ := wc.NextWriter(BinaryMessage)
441441
_, _ = io.WriteString(w, "hello")
442442
if err := w.Close(); err != nil {
443-
t.Fatalf("unxpected error closing message writer, %v", err)
443+
t.Fatalf("unexpected error closing message writer, %v", err)
444444
}
445445

446446
if _, err := io.WriteString(w, "world"); err == nil {

proxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func (hpd *httpProxyDialer) DialContext(ctx context.Context, network string, add
7777
return nil, err
7878
}
7979

80-
// Read response. It's OK to use and discard buffered reader here becaue
80+
// Read response. It's OK to use and discard buffered reader here because
8181
// the remote server does not speak until spoken to.
8282
br := bufio.NewReader(conn)
8383
resp, err := http.ReadResponse(br, connectReq)

0 commit comments

Comments
 (0)