finds.dev← search

// the find

go-martini/martini

★ 11,600 · Go · MIT · updated Mar 2022

Classy web framework for Go

Martini is a Sinatra/Express-style web framework for Go that uses reflection-based dependency injection to wire handler arguments. It's aimed at developers who want quick route definitions and middleware stacking without hand-rolling their own router, but the project has been dead since 2022 and the README says so outright.

The handler signature is just plain functions with typed arguments resolved via reflection, so you get httpHandlerFunc compatibility for free and can drop it into an existing net/http server. Route groups with their own middleware chains (m.Group) are genuinely convenient for versioned or nested APIs. martini.Classic() gives sane defaults (logging, panic recovery, static file serving) in three lines, which is still a decent teaching example of how middleware chaining works.

Unmaintained since 2022 — the README's first line is a maintenance warning, and there's no chance of security patches or Go version compatibility fixes going forward. The reflection-based DI (via the inject package) that's the framework's whole pitch is also its biggest cost: every request pays reflection overhead to resolve handler args, which is why gin displaced it as soon as people benchmarked the two side by side. The middleware ecosystem lives in the separate martini-contrib org, and most of those repos are equally stale, so anything beyond the barebones core means auditing abandoned dependencies. No context.Context support baked into the request lifecycle, which makes it awkward to wire into anything modern that expects cancellation/deadlines to propagate through handlers.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →