Skip to content

Commit de408ec

Browse files
committed
Improve minimum Go version docs
1 parent f6e6f5c commit de408ec

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
websocket is a minimal and idiomatic WebSocket library for Go.
66

7-
Go 1.12 is required as it uses a new [feature](https://github.com/golang/go/issues/26937#issuecomment-415855861) in net/http
8-
to perform WebSocket handshakes.
9-
107
This library is not final and the API is subject to change.
118

129
If you have any feedback, please feel free to open an issue.

dial.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ var secWebSocketKey = base64.StdEncoding.EncodeToString(make([]byte, 16))
3838
// The response is the WebSocket handshake response from the server.
3939
// If an error occurs, the returned response may be non nil. However, you can only
4040
// read the first 1024 bytes of its body.
41+
//
42+
// This function requires at least Go 1.12 to succeed as it uses a new feature
43+
// in net/http to perform WebSocket handshakes and get a writable body
44+
// from the transport. See https://github.com/golang/go/issues/26937#issuecomment-415855861
4145
func Dial(ctx context.Context, u string, opts DialOptions) (*Conn, *http.Response, error) {
4246
c, r, err := dial(ctx, u, opts)
4347
if err != nil {

0 commit comments

Comments
 (0)