Skip to content

v0.0.2

Choose a tag to compare

@jackielii jackielii released this 25 Jun 09:24
· 210 commits to main since this release

What's Changed

✨ New Features

  • Add automatic URL parameter extraction in URLFor - automatically fills URL parameters from request context
  • Enhanced middleware support for parameter extraction

🐛 Bug Fixes

  • Fix URLFor argument parsing logic for ambiguous cases
  • Correctly handle even-numbered string arguments that aren't key-value pairs
  • Properly handle context-prefilled parameters with positional arguments

📈 Improvements

  • Achieve 100% test coverage for formatPathSegments function
  • Add comprehensive test cases for edge cases

Example

// URLFor now automatically uses parameters from the current request
// If you're on /product/123, URLFor can generate /product/123/edit without explicitly passing the ID
editURL, _ := URLFor(req.Context(), editPage{})

Full Changelog: v0.0.1...v0.0.2