websocket
Minimal and idiomatic WebSocket library for Go (by coder)
Testify
A toolkit with common assertions and mocks that plays nicely with the standard library (by stretchr)
websocket | Testify | |
---|---|---|
18 | 75 | |
4,568 | 25,084 | |
1.7% | 0.5% | |
5.7 | 8.7 | |
17 days ago | 6 days ago | |
Go | Go | |
ISC License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
websocket
Posts with mentions or reviews of websocket.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2025-08-26.
-
aria - Event Driven websocket framework
Aria is a lightweight, event-driven WebSocket framework for Go. It is inspired by olahol/melody and built on top of coder/websocket.
-
Lies we tell ourselves to keep using Golang
As a regular Go user, I agree with this take. Though the tools exist, error wrapping and checking (with errors.Is and so on) is actually pretty rare in my experience.
Positive example of good and appropriate usage here: https://github.com/coder/websocket/blob/master/internal/exam...
-
Building Simple Real-Time System Monitor using Go, HTMX, and Web Socket
Websocket
-
Possible frameworks/languages for a web/mobile application
In my experience Go has been relatively approachable for people that are good at PHP. It has a great standard library and a pretty solid ecosystem, though frameworks aren’t as popular in Go. There are some well regarded libraries for things like WebRTC via https://github.com/pion/webrtc WebSicket via https://github.com/nhooyr/websocket
-
Websocket memory usage
Also take a look at https://github.com/nhooyr/websocket - which is a good ws library, but I don't have anything specific about its memory usage per connection. But from what I see it will be somewhat similar to x/net/websocket.
- I don't understand these lines of code in Gorilla websocket example
- Websockets with golang
-
Portal - a modern file transfer utility 🌌✨
nhooyr/websocket, shollz/pake, charmbracelet/bubbles, charmbracelet/bubbletea, charmbracelet/lipgloss, muesli/reflow, klauspost/pgzip and many, many more.
- Is there an alternative to gorilla websocket?
-
Gorilla/websocket or Melody?
link: https://github.com/nhooyr/websocket
Testify
Posts with mentions or reviews of Testify.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2025-08-06.
-
Show HN: Should – Expressive Assertions for Go
Ah this is interesting. I've been blindly using this library for the past 6 years: https://github.com/stretchr/testify.
-
15 Go Packages Worth Your Time
testify is a testing toolkit that adds better assertions, mock capabilities, and test suite support on top of Go’s built-in testing package. It’s commonly used for simplifying test logic and improving test readability.
-
5 Golang Libraries You’ll Wish You Knew Sooner
Testify simplifies writing unit tests in Go. The standard testing package is fine, but Testify adds assertions, mocking, and suite support, making tests more readable and maintainable.
-
From Vibe Coder to AI-Assisted Architect
I prefer to use the Go library testify, which significantly simplifies the code:
-
Building and Deploying a New API (Part 1)
nil is returned initially, as we're creating user_test.go and using Testify to create tests as we shape the behavior of PostUser. We don't have a DB wired up yet, so the responses will simply be hard-coded structs of what we expect the API to respond with for now to pass the tests.
-
Top 5 Go Libraries Every Backend Developer Should Know
Bonus: Testify
-
TypeScript vs Go: Choosing Your Backend Language
Testify: Popular framework with assertion functions and mock objects.
-
Building a RESTful API with Go Fiber: An Express-Inspired Boilerplate
Testing: unit and integration tests using Testify and formatted test output using gotestsum
-
Technical Deep Dive: How We Built the Pizza CLI Using Go and Cobra
We’ve integrated the excellent testify library with its “assert” functionality to allow for smoother test implementation:
-
Full Introduction to Golang with Test-Driven Development
This article is too basic and does not introduce anything you'd encounter in a typical Go project. If you want introduction to Go testing I recommend just reading the official docs https://pkg.go.dev/testing and understanding how to write table driven tests - https://go.dev/wiki/TableDrivenTests.
Going beyond what's built in, get familiar with https://github.com/stretchr/testify as that's used a lot.
What are some alternatives?
When comparing websocket and Testify you can also consider the following projects:
nbio - Pure Go 1000k+ connections solution, support tls/http1.x/websocket and basically compatible with net/http, with high-performance and low memory cost, non-blocking, event-driven, easy-to-use.
ginkgo - A Modern Testing Framework for Go
ws - Tiny WebSocket library for Go.
gomega - Ginkgo's Preferred Matcher Library
go-quilljs-delta
gotest.tools - A collection of packages to augment the go testing package and support common patterns.