Never miss a release that matters
AI-powered summaries of every GitHub release.
AI Summaries
Changelogs condensed into clear, actionable insights.
Always Free
Track up to 5 packages at no cost, forever.
Weekly Digest
A curated summary of every release, delivered weekly.
TL;DR
Gin now supports encoding UnmarshalText for URI/query binding, improving data handling flexibility and adding support for Protocol Buffers in content negotiation.
Breaking
No breaking changes.
New
- URI/Query Binding: Added support for
encoding.UnmarshalTextallowing more control over data parsing. - Protocol Buffers: Added support for Protocol Buffers (a language-neutral, platform-neutral, extensible mechanism for serializing structured data) to content negotiation.
- Context Error Handling: New
GetErrorandGetErrorSlicemethods added to the context for easier error retrieval.
Fixes Worth Knowing
- Fixed issues with empty slice/array handling during form binding.
- Improved handling of multiple
X-Forwarded-Forheaders for accurate client IP detection. - Resolved a resource leak when running Gin with file descriptors.
- Corrected issues with literal colon routes and the
engine.Handler()function. - Fixed a panic in the routing tree when using redirect fixed paths.
Before You Upgrade
No specific upgrade steps are required.
TL;DR
Gin now has an additional maintainer, ensuring continued development and support for this popular web framework (HTTP web framework).
Breaking
None.
New
None.
Fixes Worth Knowing
None.
Before You Upgrade
No action needed.
TL;DR
Gin now boasts significant performance improvements with a zero-allocation router and faster rendering, alongside extensive new features for modern web development.
Breaking
Context.Enginerenamed toContext.engine(access the Gin engine via the lowercase field).
New
- Context Support: Gin now natively supports
golang.org/x/net/context(application-defined request values). - Flexible Routing:
Any()allows creating routes matching any HTTP method and path. - Static File Serving: Enhanced
StaticFS()with directory listing control and virtual filesystem support.
Fixes Worth Knowing
- Static file serving now works correctly within nested routing groups.
- Redirects now use the standard
http.Redirect()function. - Basic Authentication now respects custom realms.
Before You Upgrade
Update your code to use Context.engine instead of Context.Engine to access the Gin engine.