Managing vendor dependencies with glide

This commit is contained in:
claudemiro
2016-02-21 20:15:10 -03:00
parent 412d8be451
commit 51eacdcf51
49 changed files with 2060 additions and 245 deletions
Generated Vendored Executable → Regular
+1
View File
@@ -17,3 +17,4 @@ using the following commands.
$ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/chat`
$ go run *.go
To use the chat example, open http://localhost:8080/ in your browser.
Generated Vendored Executable → Regular
+4 -5
View File
@@ -51,6 +51,9 @@ func (c *connection) readPump() {
for {
_, message, err := c.ws.ReadMessage()
if err != nil {
if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway) {
log.Printf("error: %v", err)
}
break
}
h.broadcast <- message
@@ -88,12 +91,8 @@ func (c *connection) writePump() {
}
}
// serverWs handles websocket requests from the peer.
// serveWs handles websocket requests from the peer.
func serveWs(w http.ResponseWriter, r *http.Request) {
if r.Method != "GET" {
http.Error(w, "Method not allowed", 405)
return
}
ws, err := upgrader.Upgrade(w, r, nil)
if err != nil {
log.Println(err)
Generated Vendored Executable → Regular
View File
Generated Vendored Executable → Regular
View File
Generated Vendored Executable → Regular
View File