Repository navigation
v0.2.1
Rush v0.2.1
Breaking Changes
1. Complete Middleware System Redesign
Two-level middleware architecture:
- Global middleware (
r.Use()) wraps the entire router — affects all routes and error handlers. - Group middleware is order-dependent and accumulative — routes inherit middleware defined above them.
- Single-route middleware with
.With()method for isolated application.
Fix: Stateful middlewares now work correctly.
Previously, middleware chains were stored per-route, causing stateful middleware to malfunction.
Global middlewares now wrap the router properly.
2. Options Handler Renamed
r.Options(breaking) → now a method for registering OPTIONS routes.r.AutoOptions→ new property for setting the global OPTIONS handler.
This change makes the API more consistent:
- Use
r.Options(pattern, handler)for route-specific OPTIONS handlers. - Use
r.AutoOptions = handlerfor the default/global OPTIONS behavior.