Hey Go community ๐
If youโve ever felt that:
- Gin is great but the custom context wrapping makes things leak into your business logic
- Chi is beautifully minimal but you end up pulling in 5โ10 extra middleware packages anyway
- You just want something clean, fast, and zero external dependencies
โฆthen I built Marten exactly for that feeling.
What is Marten?
Marten is a minimalist Go web framework with one core philosophy:
"The framework you reach for when you want nothing in the way."
It gives you:
- Ergonomic handler helpers (
c.JSON,c.Bind,c.Param,c.Query, etc.) -
Full stdlib compatibility โ real
context.Contextis untouched atc.Request.Context() -
Zero external dependencies โ just
net/http+ Go stdlib - Built-in production middleware suite (no extra imports needed):
- gzip compression (with pooling)
- CORS (configurable, secure wildcard handling)
- Secure headers (HSTS, XSS-Protection, CSP, etc.)
- Rate limiting
- Timeout
- Body limit
- Basic auth
- Request ID
- No-cache
- ETag
- Panic recovery
- Logger
All applied via clean global/group/route-level chaining.
Quick Hello World
package main
import "github.com/gomarten/marten"
func main() {
app := marten.New()
app.GET("/", func(c *marten.Ctx) error {
return c.JSON(200, map[string]string{"message": "Hello from Marten! ๐"})
})
// Add middleware in one line
app.Use(marten.Middleware.Recover, marten.Middleware.Logger, marten.Middleware.Compress())
app.Run(":8080")
}
Why Another Framework?
Because sometimes you want:
- Gin-like productivity without the custom context baggage
- Chi-like purity with more batteries included
- The confidence that your app will compile and behave the same 5 years from now (no dependency hell)
Try It Out
go get github.com/gomarten/marten
Repo: https://github.com/gomarten/marten
Docs & examples are still growing, but the code is small (~2k LOC) and very easy to read.
Would love to hear your thoughts:
- Do you prefer zero deps even if it means slightly more explicit code?
- What's your current favorite Go web stack in 2026?
Happy coding! ๐พ
Top comments (0)