From 707d1f6c6b2ddb4e12439fcf806775a688aee343 Mon Sep 17 00:00:00 2001 From: Gary Burd Date: Mon, 23 Dec 2013 12:08:49 -0800 Subject: [PATCH] Cleanup issues reported by golint. --- client.go | 2 ++ conn.go | 1 - json.go | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client.go b/client.go index 759be22..15d57ea 100644 --- a/client.go +++ b/client.go @@ -73,6 +73,7 @@ func NewClient(netConn net.Conn, u *url.URL, requestHeader http.Header, readBufS return c, resp, nil } +// A Dialer contains options for connecting to WebSocket server. type Dialer struct { // NetDial specifies the dial function for creating TCP connections. If // NetDial is nil, net.Dial is used. @@ -134,6 +135,7 @@ func parseURL(u string) (useTLS bool, host, port, opaque string, err error) { return useTLS, host, port, opaque, nil } +// DefaultDialer is a dialer with all fields set to the default zero values. var DefaultDialer *Dialer // Dial creates a new client connection. Use requestHeader to specify the diff --git a/conn.go b/conn.go index 3260061..050d8bc 100644 --- a/conn.go +++ b/conn.go @@ -765,7 +765,6 @@ func (c *Conn) SetPongHandler(h func(string) error) { c.handlePong = h } -// SetPongHandler sets the handler for // FormatCloseMessage formats closeCode and text as a WebSocket close message. func FormatCloseMessage(closeCode int, text string) []byte { buf := make([]byte, 2+len(text)) diff --git a/json.go b/json.go index 6ff3779..594e9f3 100644 --- a/json.go +++ b/json.go @@ -8,7 +8,7 @@ import ( "encoding/json" ) -// DEPRECATED: use c.WriteJSON instead. +// WriteJSON is deprecated, use c.WriteJSON instead. func WriteJSON(c *Conn, v interface{}) error { return c.WriteJSON(v) } @@ -30,7 +30,7 @@ func (c *Conn) WriteJSON(v interface{}) error { return err2 } -// DEPRECATED: use c.ReadJSON instead. +// ReadJSON is deprecated, use c.ReadJSON instead. func ReadJSON(c *Conn, v interface{}) error { return c.ReadJSON(v) }