The problem with most frameworks
Many web frameworks introduce their own way of doing things:| Framework pattern | Problem for Go developers |
|---|---|
| Magic routing annotations | Hard to trace which handler runs |
| Dependency injection containers | Hidden object creation |
| Custom context types | Must learn framework-specific APIs |
| Code generation | Extra build steps, harder debugging |
Mizu’s approach
Mizu takes a different path: enhance Go’s standard library, don’t replace it.Stay close to the standard library
Mizu uses Go 1.22’s enhancedServeMux for routing—the same router from the standard library, just with helper methods added. Your handlers receive a context that wraps http.ResponseWriter and *http.Request. You can access the underlying types anytime:
- Any
http.Handlercan be mounted directly - Any middleware that works with
net/httpworks with Mizu - Stack traces show familiar Go types
- Your existing knowledge transfers directly
Return errors from handlers
Standard Go handlers have this signature:No reflection or magic
Mizu does not scan struct tags to bind parameters. It does not generate code. It does not use dependency injection. You read data with explicit method calls and write responses with explicit helpers.- Debugging is straightforward—step through and see what happens
- No surprises from automatic binding or conversion
- Code is self-documenting—what you see is what runs
- IDE navigation works perfectly
Production defaults
Mizu includes what you need for production without extra setup:| Feature | What it does | Why it matters |
|---|---|---|
| Graceful shutdown | Drains active connections on SIGINT/SIGTERM | Zero dropped requests during deploys |
| Structured logging | Uses Go’s slog package | JSON logs for production, readable logs for dev |
| Panic recovery | Catches panics, logs stack traces | Server stays running after bugs |
| Health endpoints | LivezHandler(), ReadyzHandler() | Works with Kubernetes and load balancers |
Small surface area
The entire framework fits in a few files:app.go- Server lifecycle and configurationrouter.go- Routing and middlewarecontext.go- Request/response helperslogger.go- Request logging middleware
net/http, you understand Mizu.
When to use Mizu
Mizu is a good fit when you want:- A lightweight wrapper over Go’s HTTP server
- Explicit code without hidden behavior
- Easy integration with existing
net/httpcode - Production-ready defaults without external dependencies
- To keep using Go idioms, not learn framework idioms
- You want an opinionated full-stack framework with ORM, auth, and admin panels built in
- You prefer convention over configuration
- You want automatic parameter binding from struct tags
- You need built-in WebSocket support (you’ll add a library like gorilla/websocket)
database/sql or any ORM. Mizu handles HTTP; you choose the rest.