MINO / SMALL STEPS. OPEN POSSIBILITIES.
Start small.
Grow your way.
Adopt what you need. Compose as you grow. Keep writing familiar Go.
go get github.com/hainuoli/minoProgressive
From one utility to an HTTP service, at your own pace.
Lightweight
2,003 production code lines. Zero third-party runtime dependencies.
Fast
85.5 ns/op for static routes. Lowest median in four of six measured workloads.
Great DX
Useful defaults and consistent conventions, with less repetitive code.
Intuitive
Standard HTTP handlers, contexts, and error chains. Familiar Go.
Adopt on demand
Use the packages you need, independently or together.
HELLO, MINO.
Familiar Go.
A natural start.
A standard HTTP handler. One call to return JSON. Save as main.go to run your first Mino service.
Run this examplepackage main
import (
"log"
"net/http"
"github.com/hainuoli/mino/rest"
"github.com/hainuoli/mino/rest/httpx"
)
func main() {
mux := rest.NewMux()
mux.Get("/", func(w http.ResponseWriter, r *http.Request) {
httpx.OkJSON(w, "Hello, Mino!")
})
log.Fatal(http.ListenAndServe(":8080", mux))
}"Hello, Mino!"200 OK01 / ROOM TO GROW
Room to grow.
Start with one package
Encode JSON, wrap errors, or compose existing middleware.
jsonx · errorx · mapping · chainAdd request handling
Bring in binding, validation, and responses. Keep standard handlers.
httpx.Parse → Validate → OkJSONGrow into a service
Add routing, groups, and middleware around the same handlers.
rest.NewMux → Route → Use02 / AT HOME IN NET/HTTP
Your existing service.
A small next step.
Replace the constructor. Keep your registrations, handlers, middleware, and server setup. Enable path policies to match your existing service.
Move from ServeMux− mux := http.NewServeMux()
+ mux := rest.NewMux()
mux.HandleFunc("GET /users/{id}", getUser)http.Handler→r.PathValue→Keep your code03 / SMALL CODE. MEASURED SPEED.
Speed, with the evidence.
85.5ns/op
Static routing · Lowest median in four of six workloads
Added binary size over a minimal net/http server.
| Scenario / ns/op | Mino | Gin | Chi | go-zero router |
|---|---|---|---|---|
| Static route | 85.5 | 101.2 | 220.3 | 123.4 |
| One parameter | 183.0 | 127.0 | 343.5 | 385.2 |
| Three parameters | 274.5 | 197.6 | 499.1 | 679.2 |
| 1,000 routes | 131.3 | 170.6 | 355.1 | 5,328.0 |
| Five middleware layers | 254.9 | 279.1 | 410.7 | 304.4 |
| Route + JSON | 178.5 | 217.9 | 316.5 | 219.5 |
Apple M4 · Go 1.25.4 · Median of five runs · -cpu=1 · 2026-11-15
In-process ServeHTTP without default middleware; go-zero uses its standalone router.
Gin leads the parameter workloads. Mino currently allocates a map when populating standard PathValue. Read the analysis ↗
YOUR CODE. YOUR PACE.