mirror of https://github.com/gorilla/websocket.git
Cleanup issues reported by golint.
This commit is contained in:
parent
67d178946a
commit
707d1f6c6b
|
@ -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
|
||||
|
|
1
conn.go
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))
|
||||
|
|
4
json.go
4
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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue