A simple, lightweight HTTP router for Go with support for static, dynamic, and catch-all routing.
Violetear is a Go HTTP router that provides routing capabilities for web applications and APIs. It handles static, dynamic, and catch-all routes with regex support, integrates middleware, and includes features like request ID tracing and HTTP/2 support. It solves the need for a lightweight, simple router that stays out of the way while offering essential routing functionality.
Go developers building web services, REST APIs, or any HTTP-based application who prefer a minimal, unopinionated router over larger frameworks.
Developers choose Violetear for its adherence to simplicity, small footprint, and straightforward integration with the standard `net/http` package. Its focus on core routing without bloat makes it a reliable choice for projects where performance and maintainability are key.
Go 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.
Adheres strictly to the KISS principle with a small codebase focused only on routing, avoiding bloat and unnecessary complexity as emphasized in the design goals.
Uses the standard http.Handler interface and Alice for chaining, making it easy to integrate with existing Go middleware, as shown in the middleware examples.
Shares a common context across handlers and automatically assigns request IDs for tracking, facilitating debugging and data passing between middleware.
Supports native HTTP/2 including server push capabilities, enhancing performance for modern web applications with examples provided in the README.
Requires explicit regex definitions for dynamic parameters using AddRegex, adding boilerplate and potential for errors compared to routers with built-in param parsing.
Lacks out-of-the-box support for common web needs like CORS, rate limiting, or validation, forcing developers to rely on additional middleware or custom code.
With a smaller community than routers like Gin or Echo, finding third-party plugins, tutorials, or timely help can be more difficult, as noted by its niche adoption.