// the find
coder/websocket
Minimal and idiomatic WebSocket library for Go
A Go WebSocket library that replaced gorilla/websocket as the de facto standard after gorilla was archived. Now maintained by Coder (the remote dev environment company) after the original author stepped away in 2024. For Go developers who need WebSocket support without pulling in a framework.
Full context.Context propagation throughout — cancellation and deadlines work exactly as you'd expect in Go. Zero allocations on reads and writes with transparent buffer reuse in the wsjson subpackage, which matters in high-throughput scenarios. Passes the Autobahn test suite, so RFC compliance isn't aspirational. Assembly-optimized WebSocket masking (AMD64 and ARM64) that's faster than gorilla's unsafe-based implementation.
HTTP/2 WebSocket support (RFC 8441) is still open after 7+ years — the 'http2' topic on the repo is aspirational, not implemented. No in-memory test pipe yet (wstest.Pipe is on the roadmap but not shipped), which makes unit testing handlers more awkward than it should be. Coder's stewardship is good but also a risk: they're maintaining it because they use it internally, not because it's their product — if their needs diverge from yours, maintenance priorities will reflect that. Examples are buried in internal/ and not importable, which is an odd choice for a library.