diff --git a/README.md b/README.md index d33ed7f..ff8bfab 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,10 @@ Gorilla WebSocket is a [Go](http://golang.org/) implementation of the ### Documentation * [API Reference](https://pkg.go.dev/github.com/gorilla/websocket?tab=doc) -* [Chat example](https://github.com/gorilla/websocket/tree/master/examples/chat) -* [Command example](https://github.com/gorilla/websocket/tree/master/examples/command) -* [Client and server example](https://github.com/gorilla/websocket/tree/master/examples/echo) -* [File watch example](https://github.com/gorilla/websocket/tree/master/examples/filewatch) +* [Chat example](https://github.com/gorilla/websocket/tree/main/examples/chat) +* [Command example](https://github.com/gorilla/websocket/tree/main/examples/command) +* [Client and server example](https://github.com/gorilla/websocket/tree/main/examples/echo) +* [File watch example](https://github.com/gorilla/websocket/tree/main/examples/filewatch) ### Status @@ -29,5 +29,4 @@ package API is stable. The Gorilla WebSocket package passes the server tests in the [Autobahn Test Suite](https://github.com/crossbario/autobahn-testsuite) using the application in the [examples/autobahn -subdirectory](https://github.com/gorilla/websocket/tree/master/examples/autobahn). - +subdirectory](https://github.com/gorilla/websocket/tree/main/examples/autobahn). diff --git a/examples/chat/README.md b/examples/chat/README.md index 7baf3e3..f8aecba 100644 --- a/examples/chat/README.md +++ b/examples/chat/README.md @@ -38,7 +38,7 @@ sends them to the hub. ### Hub The code for the `Hub` type is in -[hub.go](https://github.com/gorilla/websocket/blob/master/examples/chat/hub.go). +[hub.go](https://github.com/gorilla/websocket/blob/main/examples/chat/hub.go). The application's `main` function starts the hub's `run` method as a goroutine. Clients send requests to the hub using the `register`, `unregister` and `broadcast` channels. @@ -57,7 +57,7 @@ unregisters the client and closes the websocket. ### Client -The code for the `Client` type is in [client.go](https://github.com/gorilla/websocket/blob/master/examples/chat/client.go). +The code for the `Client` type is in [client.go](https://github.com/gorilla/websocket/blob/main/examples/chat/client.go). The `serveWs` function is registered by the application's `main` function as an HTTP handler. The handler upgrades the HTTP connection to the WebSocket @@ -85,7 +85,7 @@ network. ## Frontend -The frontend code is in [home.html](https://github.com/gorilla/websocket/blob/master/examples/chat/home.html). +The frontend code is in [home.html](https://github.com/gorilla/websocket/blob/main/examples/chat/home.html). On document load, the script checks for websocket functionality in the browser. If websocket functionality is available, then the script opens a connection to