From de408ec7ecf39671a1a364c6c24272b33ffd3f4f Mon Sep 17 00:00:00 2001
From: Anmol Sethi <hi@nhooyr.io>
Date: Sat, 27 Apr 2019 12:40:09 -0400
Subject: [PATCH] Improve minimum Go version docs

---
 README.md | 3 ---
 dial.go   | 4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 6bbaefc..ca2ad98 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 36c12c4..e9524f5 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 {
-- 
GitLab