Releases: gomarten/marten
Releases · gomarten/marten
Release list
v0.1.4 — Bug fixes & new helpers
Bug Fixes
Timeout/TimeoutWithConfig— data race when slow handler wrote concurrently with timeout response. Fixed with atomictimeoutWriter.Routes()— root route/was returned as empty string. Now correct.Routes()— non-deterministic order. Now sorted by path, then method.BodyLimit— chunked over-limit body returned 500 instead of 413. Now consistently 413.
New Features
c.Accepted(v)— 202 response helper for async / queued jobsc.QueryFloat64(name)— typed float query paramc.GetFloat64(key)— typed float store gettermiddleware.Health(path)— zero-config health check endpoint, bypasses all other middlewaremiddleware.HealthWithConfig(cfg)— configurable variant with custom path and handlermarten.NewCtx(w, r)— public context constructor for custom middleware
Tests
355+ test cases, all passing with -race.
Full changelog: https://github.com/gomarten/marten/blob/main/CHANGELOG.md
Release v0.1.3 - Static File Serving & Bug Fixes
New Features:
• Static file serving middleware with caching, security and directory browsing
• Content-type detection, If-Modified-Since support, directory traversal prevention
Bug Fixes:
• Fixed wildcard routes with trailing slash
• Fixed group prefix normalization
• Fixed Stream() nil reader panic
• Fixed timeout middleware race condition
• Fixed XSS vulnerability in directory listing
Testing:
• Added 75 comprehensive tests (325 total, 100% passing)
• Stress tests for 1000+ concurrent requests
• Integration tests for real-world workflows
See CHANGELOG.md for full details.
v0.1.2 - Lifecycle Hooks & Middleware Enhancements
Added
OnStart()andOnShutdown()lifecycle hooks for App- Logger:
EnableColorsfor colored terminal output - Logger:
JSONFormatfor structured JSON logs RecoverWithConfig()with custom panic handlerRecoverJSONmiddleware for JSON error responsesRateLimitConfig.OnLimitReachedfor custom rate limit responses- CORS wildcard subdomain support (e.g.,
*.example.com) Bind()now supportsapplication/x-www-form-urlencodedBind()now supportsmultipart/form-data
Fixed
- Context pool reset ensures all fields cleared between requests
Bind()returns error for empty request bodyBind()checks Content-Type header before parsing
Install
go get github.com/gomarten/marten@v0.1.2v0.1.1
Bug fixes and router improvements.
Added
HEAD()andOPTIONS()route methodsRoutes()for listing registered routes- Context helpers:
GetHeader(),Written(),HTML(),Blob(),Stream(),QueryParams() LoggerWithConfig()with custom output and skip optionsNewRateLimiter()withStop()for cleanup- Rate limit headers (
X-RateLimit-*,Retry-After) - CORS
ExposeHeadersandMaxAgeoptions SetTrailingSlash()configuration (Ignore, Redirect, Strict)- Route conflict detection for param routes
Fixed
- Router returns 405 instead of 404 when method doesn't match
- Timeout middleware goroutine leak
- RateLimit cleanup goroutine now stoppable
- Compress middleware buffer flush
- Group middleware slice mutation
- CORS
Vary: Originheader - ETag middleware preserves response headers
- BodyLimit handles chunked encoding
Install
go get github.com/gomarten/marten@v0.1.1