From 9a0d2410f4997ed430425785baa80b29dc10c66a Mon Sep 17 00:00:00 2001
From: Anmol Sethi <hi@nhooyr.io>
Date: Sat, 30 Mar 2019 23:04:10 -0500
Subject: [PATCH] Remove accidental x/net/websocket import

---
 json.go | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/json.go b/json.go
index 97eb7c6..ca4ac92 100644
--- a/json.go
+++ b/json.go
@@ -4,7 +4,6 @@ import (
 	"context"
 	"encoding/json"
 
-	"golang.org/x/net/websocket"
 	"golang.org/x/xerrors"
 )
 
@@ -15,7 +14,7 @@ func ReadJSON(ctx context.Context, c *Conn, v interface{}) error {
 		return xerrors.Errorf("failed to read json: %w", err)
 	}
 
-	if typ != websocket.TextFrame {
+	if typ != Text {
 		return xerrors.Errorf("unexpected frame type for json (expected TextFrame): %v", typ)
 	}
 
@@ -32,7 +31,7 @@ func ReadJSON(ctx context.Context, c *Conn, v interface{}) error {
 
 // WriteJSON writes the json message v into c.
 func WriteJSON(ctx context.Context, c *Conn, v interface{}) error {
-	w := c.MessageWriter(websocket.TextFrame)
+	w := c.MessageWriter(Text)
 	w.SetContext(ctx)
 
 	e := json.NewEncoder(w)
-- 
GitLab