mirror of https://github.com/gorilla/websocket.git
Fix documentation typos
This commit is contained in:
parent
234959944d
commit
6b3bf61ce8
7
doc.go
7
doc.go
|
@ -46,8 +46,7 @@
|
||||||
// method to get an io.WriteCloser, write the message to the writer and close
|
// method to get an io.WriteCloser, write the message to the writer and close
|
||||||
// the writer when done. To receive a message, call the connection NextReader
|
// the writer when done. To receive a message, call the connection NextReader
|
||||||
// method to get an io.Reader and read until io.EOF is returned. This snippet
|
// method to get an io.Reader and read until io.EOF is returned. This snippet
|
||||||
// snippet shows how to echo messages using the NextWriter and NextReader
|
// shows how to echo messages using the NextWriter and NextReader methods:
|
||||||
// methods:
|
|
||||||
//
|
//
|
||||||
// for {
|
// for {
|
||||||
// messageType, r, err := conn.NextReader()
|
// messageType, r, err := conn.NextReader()
|
||||||
|
@ -141,9 +140,9 @@
|
||||||
// An application can allow connections from any origin by specifying a
|
// An application can allow connections from any origin by specifying a
|
||||||
// function that always returns true:
|
// function that always returns true:
|
||||||
//
|
//
|
||||||
// var upgrader = websocket.Upgrader{
|
// var upgrader = websocket.Upgrader{
|
||||||
// CheckOrigin: func(r *http.Request) bool { return true },
|
// CheckOrigin: func(r *http.Request) bool { return true },
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// The deprecated Upgrade function does not enforce an origin policy. It's the
|
// The deprecated Upgrade function does not enforce an origin policy. It's the
|
||||||
// application's responsibility to check the Origin header before calling
|
// application's responsibility to check the Origin header before calling
|
||||||
|
|
Loading…
Reference in New Issue