choose when you want an idiomatic, composable Go router with middleware support and active maintenance; modern peer to httprouter.
lightweight, idiomatic and composable router for building Go HTTP services
- 22.7k
- Go
- MIT
Go HTTP router/mux
HttpRouter is a high-performance HTTP request router (mux) for Go using a radix tree for efficient routing, method matching, and trailing slash redirects.
Same problem, same approach. Swapping one for another is a config change, not a rewrite.
choose when you want an idiomatic, composable Go router with middleware support and active maintenance; modern peer to httprouter.
lightweight, idiomatic and composable router for building Go HTTP services
Solves the same problem with a different architecture or at a different layer. Expect to rewrite the integration.
choose when you want a full Go web framework built around httprouter with middleware and context helpers.
Gin is a high-performance HTTP web framework written in Go. It provides a Martini-like API but with significantly better performance—up to 40 times faster—thanks to httprouter. Gin is designed for building REST APIs, web applications, and microservices.
choose when you want a batteries-included Go web framework with auto binding, though it is several years stale.
Faygo is a fast and concise Go Web framework that can be used to develop high-performance web app(especially API) with fewer codes. Just define a struct handler, faygo will automatically bind/verify the request parameters and generate the online API doc.
choose when you want a high-performance, extensible Go HTTP framework for microservices rather than a bare router.
Go HTTP framework with high-performance and strong-extensibility for building micro-services.
An earlier or more limited way to do the job. Still the right call when you need something small, proven, or CPU-only.
choose when you need complex route matching (regex, domains, schemes) and can accept slower matching and stale maintenance.
Package gorilla/mux is a powerful HTTP router and URL matcher for building Go web servers with 🦍
choose when you want a minimal, very fast Go router with a tiny API, but it is long unmaintained.
Lightning Fast HTTP Multiplexer
These projects were analysed and named httprouter among their alternatives. The relationship is not symmetric — how httprouter rates them is a separate judgement, made when httprouter is analysed in its own right.
calls httprouter “a narrow, high-performance router only; choose if you only need routing and want a radix-tree matcher without middleware or binding, but it is stale.”
High performance, minimalist Go web framework
calls httprouter “Choose when raw routing performance and a simple radix tree matter more than composable middleware, but expect no active maintenance.”
lightweight, idiomatic and composable router for building Go HTTP services
calls httprouter “Higher raw routing performance with a radix tree and minimal API, but lacks mux's regex/host matching and has had no pushes for over 2 years.”
Package gorilla/mux is a powerful HTTP router and URL matcher for building Go web servers with 🦍