From b51f4131251c78b4c4ec569f8d16e3999efd9f8c Mon Sep 17 00:00:00 2001 From: Xtreme Date: Sat, 29 Nov 2025 11:44:54 +0330 Subject: [PATCH 1/4] fix: rename extenstion.go to extension.go --- wsutil/{extenstion.go => extension.go} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename wsutil/{extenstion.go => extension.go} (100%) diff --git a/wsutil/extenstion.go b/wsutil/extension.go similarity index 100% rename from wsutil/extenstion.go rename to wsutil/extension.go From c8b651d40009add4303d6802a48d85de8f6adaa6 Mon Sep 17 00:00:00 2001 From: Xtreme Date: Sat, 29 Nov 2025 11:45:01 +0330 Subject: [PATCH 2/4] fix: correct typo in ProtocolCustom comment (ProtocolCustrom -> ProtocolCustom) --- server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index 863bb22..84c047c 100644 --- a/server.go +++ b/server.go @@ -281,9 +281,9 @@ type Upgrader struct { // The argument is only valid until the callback returns. Protocol func([]byte) bool - // ProtocolCustrom allow user to parse Sec-WebSocket-Protocol header manually. + // ProtocolCustom allows users to parse Sec-WebSocket-Protocol header manually. // Note that returned bytes must be valid until Upgrade returns. - // If ProtocolCustom is set, it used instead of Protocol function. + // If ProtocolCustom is set, it is used instead of Protocol function. ProtocolCustom func([]byte) (string, bool) // Extension is a select function that is used to select extensions From 28df7aed16c935531e0a40911478267e134e4397 Mon Sep 17 00:00:00 2001 From: Xtreme Date: Sat, 29 Nov 2025 11:45:09 +0330 Subject: [PATCH 3/4] fix: correct typo in UTF8Reader comment (dit -> did) --- wsutil/utf8.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wsutil/utf8.go b/wsutil/utf8.go index b8dc726..e733141 100644 --- a/wsutil/utf8.go +++ b/wsutil/utf8.go @@ -22,7 +22,7 @@ var ErrInvalidUTF8 = fmt.Errorf("invalid utf8") // Another possible case is when some valid sequence become split by the read // bound. Then UTF8Reader can not make decision about validity of the last // sequence cause it is not fully read yet. And if the read stops, Valid() will -// return false, even if Read() by itself dit not. +// return false, even if Read() by itself did not. type UTF8Reader struct { Source io.Reader From 4f88ace1a3f7469a9fccd7fe2365f5df1224bdc2 Mon Sep 17 00:00:00 2001 From: Xtreme Date: Sat, 29 Nov 2025 11:45:18 +0330 Subject: [PATCH 4/4] docs: add missing godoc comment for StatusCode method --- errors.go | 1 + 1 file changed, 1 insertion(+) diff --git a/errors.go b/errors.go index f5668b2..da9713e 100644 --- a/errors.go +++ b/errors.go @@ -54,6 +54,7 @@ func (r *ConnectionRejectedError) Error() string { return r.reason } +// StatusCode returns the HTTP status code for the connection rejection. func (r *ConnectionRejectedError) StatusCode() int { return r.code }