Show HN: A minimal and idiomatic WebSocket library for Go
While I believe nhooyr/websocket has a better API than existing libraries, both gorilla/websocket and gobwas/ws were extremely useful in implementing the WebSocket protocol correctly so big thanks to the authors of both. Furthermore, nhooyr/websocket has support for newer Go idioms such as context.Context and also uses net/http’s Client and ResponseWriter directly for WebSocket handshakes. If you want a library that gives you absolute control over everything, this is the library, but for most users, the API provided by nhooyr/websocket will fit better as it is nearly just as performant but much easier to use correctly and idiomatic.
Source: github.com