mirror of https://github.com/gorilla/websocket.git
Fix typo in Upgrade example.
This commit is contained in:
parent
b118f62ec0
commit
536d8dd066
16
doc.go
16
doc.go
|
@ -11,14 +11,14 @@
|
||||||
// Conn:
|
// Conn:
|
||||||
//
|
//
|
||||||
// func handler(w http.ResponseWriter, r *http.Request) {
|
// func handler(w http.ResponseWriter, r *http.Request) {
|
||||||
// conn, err := websocket.Upgrade(w, r.Header, nil, 1024, 1024)
|
// ws, err := websocket.Upgrade(w, r, nil, 1024, 1024)
|
||||||
// if _, ok := err.(websocket.HandshakeError); ok {
|
// if _, ok := err.(websocket.HandshakeError); ok {
|
||||||
// http.Error(w, "Not a websocket handshake", 400)
|
// http.Error(w, "Not a websocket handshake", 400)
|
||||||
// return
|
// return
|
||||||
// } else if err != nil {
|
// } else if err != nil {
|
||||||
// log.Println(err)
|
// log.Println(err)
|
||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
// ... Use conn to send and receive messages.
|
// ... Use conn to send and receive messages.
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue