mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Remove some redundancy in websocketconn naming.
Rename websocketconn.WebSocketConn to websocketconn.Conn, and websocketconn.NewWebSocketConn to websocketconn.New Following the guidelines at https://blog.golang.org/package-names#TOC_3%2e
This commit is contained in:
parent
5b01df9030
commit
e47dd5e2b4
4 changed files with 13 additions and 13 deletions
|
@ -60,7 +60,7 @@ type StubHandler struct{}
|
|||
func (handler *StubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
ws, _ := upgrader.Upgrade(w, r, nil)
|
||||
|
||||
conn := websocketconn.NewWebSocketConn(ws)
|
||||
conn := websocketconn.New(ws)
|
||||
defer conn.Close()
|
||||
|
||||
//dial stub OR
|
||||
|
@ -90,7 +90,7 @@ func Test(t *testing.T) {
|
|||
So(err, ShouldBeNil)
|
||||
|
||||
ws, _, err := websocket.DefaultDialer.Dial("ws://localhost:8888", nil)
|
||||
wsConn := websocketconn.NewWebSocketConn(ws)
|
||||
wsConn := websocketconn.New(ws)
|
||||
So(err, ShouldEqual, nil)
|
||||
So(wsConn, ShouldNotEqual, nil)
|
||||
|
||||
|
@ -133,7 +133,7 @@ func Test(t *testing.T) {
|
|||
|
||||
ws, _, err := websocket.DefaultDialer.Dial("ws://localhost:8888", nil)
|
||||
So(err, ShouldEqual, nil)
|
||||
wsConn := websocketconn.NewWebSocketConn(ws)
|
||||
wsConn := websocketconn.New(ws)
|
||||
So(wsConn, ShouldNotEqual, nil)
|
||||
|
||||
wsConn.Write([]byte("Hello"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue