Forráskód Böngészése

Cleanup issues reported by golint.

Gary Burd 12 éve
szülő
commit
707d1f6c6b
3 módosított fájl, 4 hozzáadás és 3 törlés
  1. 2 0
      client.go
  2. 0 1
      conn.go
  3. 2 2
      json.go

+ 2 - 0
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

+ 0 - 1
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))

+ 2 - 2
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)
 }