Hello guys,
is that this nonetheless the go-to lib for websockets?
Are there options out?
It’s nonetheless not within the std lib, appropriate?
It’s the first time I would like them.
Thanks & KR
Karl
Yow will discover a bunch of go packages hyperlinks in GitHub – avelino/awesome-go: A curated listing of superior Go frameworks, libraries and software program.
Additionally get fundamental data from The WebSocket API (WebSockets) – Internet APIs | MDN
HTH
The docs from x/web/websocket nonetheless recommend gorilla or https://github.com/coder/websocket. I’ve used gorilla semi-recently and it was simple to make use of and motive about and I’d in all probability use it once more. Take a look at this repo for a bit demo I constructed utilizing gorilla and client-side code that interfaces with it.
OK – however all that having been mentioned, this mission seems attention-grabbing:
Abstractions constructed on prime of websockets. It has a JS lib to go together with it, and Grafana is utilizing it. The docs look good and the examples are intensive. Solely draw back is: no v1 but so no compatibility assure (however I can’t think about they’re breaking issues too usually if Grafana is constructed on it!).
Listed below are some discussions about this matter with even extra choices:
https://www.reddit.com/r/golang/feedback/zu80o0/gorillawebsocket_or_melody/
https://www.reddit.com/r/golang/feedback/1cq61io/which_librarys_websocket_to_use/
In abstract: I don’t assume there’s a definitive reply right here, sadly. Decide one thing with a license that works for you and docs / examples that enchantment to you.