A lightning-fast HTTP router for Go with full http.Handler compatibility and zero memory allocations during serving.
gowww/router is a lightweight, high-performance HTTP router for Go applications. It provides fast and efficient routing with full compatibility to the standard http.Handler interface, enabling developers to build scalable web services and APIs with minimal overhead.
Go developers building web servers, APIs, or microservices that require fast and reliable HTTP routing without the bloat of larger frameworks.
Developers choose gowww/router for its exceptional performance, zero-allocation design, and seamless integration with Go's standard library, offering a straightforward and predictable routing solution.
⚡️ A lightning fast HTTP router
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Achieves sub-microsecond routing with zero memory allocations during serving (except for parameters), as benchmarked in the README, making it ideal for high-throughput applications.
Fully integrates with Go's net/http.Handler interface, allowing seamless adoption in existing projects without requiring special handlers or interfaces.
Supports named parameters, regular expression constraints, and wildcard matching with smart prioritization to avoid route conflicts, as detailed in the usage examples.
Marked as stable with thorough testing and production use, ensuring reliability for real-world deployments without breaking changes.
Lacks integrated middleware for common tasks like logging or authentication, forcing developers to manually implement or source third-party solutions.
Parameters are retrieved via a global function router.Parameter(r, key), which can be verbose and less intuitive than direct handler arguments in some routers.
Focuses on core routing only; missing features like automatic OPTIONS handling for CORS, nested routers, or subdomain routing require extra workarounds.