diff --git a/README.md b/README.md index 6bbaefc2ee0b6cba823e0acad96696241784bac7..ca2ad985f434dbdb33e52e6560e9382f85e7faa2 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,6 @@ websocket is a minimal and idiomatic WebSocket library for Go. -Go 1.12 is required as it uses a new [feature](https://github.com/golang/go/issues/26937#issuecomment-415855861) in net/http -to perform WebSocket handshakes. - This library is not final and the API is subject to change. If you have any feedback, please feel free to open an issue. diff --git a/dial.go b/dial.go index 36c12c4b45d57420dc4d7926a4e438aeaa769911..e9524f51cae09dfa435975b639079332574866a9 100644 --- a/dial.go +++ b/dial.go @@ -38,6 +38,10 @@ var secWebSocketKey = base64.StdEncoding.EncodeToString(make([]byte, 16)) // The response is the WebSocket handshake response from the server. // If an error occurs, the returned response may be non nil. However, you can only // read the first 1024 bytes of its body. +// +// This function requires at least Go 1.12 to succeed as it uses a new feature +// in net/http to perform WebSocket handshakes and get a writable body +// from the transport. See https://github.com/golang/go/issues/26937#issuecomment-415855861 func Dial(ctx context.Context, u string, opts DialOptions) (*Conn, *http.Response, error) { c, r, err := dial(ctx, u, opts) if err != nil {