Skip to content

Releases: gomarten/marten

v0.1.4 — Bug fixes & new helpers

Choose a tag to compare

@jackprscott jackprscott released this 07 Jun 13:41

Bug Fixes

  • Timeout / TimeoutWithConfig — data race when slow handler wrote concurrently with timeout response. Fixed with atomic timeoutWriter.
  • 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 jobs
  • c.QueryFloat64(name) — typed float query param
  • c.GetFloat64(key) — typed float store getter
  • middleware.Health(path) — zero-config health check endpoint, bypasses all other middleware
  • middleware.HealthWithConfig(cfg) — configurable variant with custom path and handler
  • marten.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

Choose a tag to compare

@jackprscott jackprscott released this 19 Jan 17:58

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

Choose a tag to compare

@jackprscott jackprscott released this 14 Jan 10:12

Added

  • OnStart() and OnShutdown() lifecycle hooks for App
  • Logger: EnableColors for colored terminal output
  • Logger: JSONFormat for structured JSON logs
  • RecoverWithConfig() with custom panic handler
  • RecoverJSON middleware for JSON error responses
  • RateLimitConfig.OnLimitReached for custom rate limit responses
  • CORS wildcard subdomain support (e.g., *.example.com)
  • Bind() now supports application/x-www-form-urlencoded
  • Bind() now supports multipart/form-data

Fixed

  • Context pool reset ensures all fields cleared between requests
  • Bind() returns error for empty request body
  • Bind() checks Content-Type header before parsing

Install

go get github.com/gomarten/marten@v0.1.2

v0.1.1

Choose a tag to compare

@jackprscott jackprscott released this 10 Jan 09:28

Bug fixes and router improvements.

Added

  • HEAD() and OPTIONS() route methods
  • Routes() for listing registered routes
  • Context helpers: GetHeader(), Written(), HTML(), Blob(), Stream(), QueryParams()
  • LoggerWithConfig() with custom output and skip options
  • NewRateLimiter() with Stop() for cleanup
  • Rate limit headers (X-RateLimit-*, Retry-After)
  • CORS ExposeHeaders and MaxAge options
  • 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: Origin header
  • ETag middleware preserves response headers
  • BodyLimit handles chunked encoding

Install

go get github.com/gomarten/marten@v0.1.1