gorilla/websocket ? reverse-engineered prompt

Reverse engineered prompt

Build me a Go package for working with WebSockets that’s fast, reliable, and follows the WebSocket standard. I want it to make it easy to write both servers and clients, send and receive text and binary messages, handle JSON nicely, and support common things like compression and prepared messages. Please include simple example programs for a chat app, an echo server and client, a small command style app, and a file watch demo so I can see how to use it right away.

Make the API feel clean and stable, with good docs and solid tests so it’s safe to use in real projects. If anything needs a current best practice or up to date detail, look it up online before implementing it. I also want the package to work well enough to pass standard WebSocket compliance tests, so build it with correctness and compatibility in mind.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab