Changelog
Features
- 192ac89: feat(binding): add support for encoding.UnmarshalText in uri/query binding (#4203) (@takanuva15)
- 53410d2: feat(context): add GetError and GetErrorSlice methods for error retrieval (#4502) (@raju-mechatronics)
- acc55e0: feat(context): add Protocol Buffers support to content negotiation (#4423) (@1911860538)
- 38e7651: feat(context): implemented Delete method (@Spyder01)
- 771dcc6: feat(gin): add option to use escaped path (#4420) (@ldesauw)
- 4dec17a: feat(logger): color latency (#4146) (@wsyqn6)
- d7776de: feat(render): add bson protocol (#4145) (@laurentcau)
Bug fixes
- b917b14: fix(binding): empty value error (#2169) (@guonaihong)
- c3d1092: fix(binding): improve empty slice/array handling in form binding (#4380) (@1911860538)
- 9914178: fix(context): ClientIP handling for multiple X-Forwarded-For header values (#4472) (@Nurysso)
- 2a794cd: fix(debug): version mismatch (#4403) (@zeek0x)
- c3d5a28: fix(gin): close os.File in RunFd to prevent resource leak (#4422) (@1911860538)
- 5fad976: fix(gin): literal colon routes not working with engine.Handler() (#4415) (@pawannn)
- 63dd3e6: fix(recover): suppress http.ErrAbortHandler in recover (#4336) (@MondayCha)
- 5c00df8: fix(render): write content length in Data.Render (#4206) (@dengaleev)
- 234a6d4: fix(response): refine hijack behavior for response lifecycle (#4373) (@appleboy)
- 472d086: fix(tree): panic in findCaseInsensitivePathRec with RedirectFixedPath (#4535) (@veeceey)
- 8e07d37: fix: Correct typos, improve documentation clarity, and remove dead code (#4511) (@mahanadh)
Enhancements
- ba093d1: chore(binding): upgrade bson dependency to mongo-driver v2 (#4549) (@BobDu)
- b2b489d: chore(context): always trust xff headers from unix socket (#3359) (@WeidiDeng)
- ecb3f7b: chore(deps): upgrade golang.org/x/crypto to v0.45.0 (#4449) (@appleboy)
- af6e8b7: chore(deps): upgrade quic-go to v0.57.1 (@appleboy)
- db30908: chore(logger): allow skipping query string output (#4547) (@USA-RedDragon)
- 26c3a62: chore(response): prevent Flush() panic when
http.Flusher(#4479) (@Twacqwq) - 5dd833f: chore: bump minimum Go version to 1.24 and update workflows (#4388) (@appleboy)
Refactor
- 39858a0: refactor(binding): use maps.Copy for cleaner map handling (#4352) (@russcoss)
- c0048f6: refactor(context): omit the return value names (#4395) (@wanghaolong613)
- 915e4c9: refactor(context): replace hardcoded localhost IPs with constants (#4481) (@pauloappbr)
- 414de60: refactor(context): using maps.Clone (#4333) (@cuiweixie)
- 59e9d4a: refactor(ginS): use sync.OnceValue to simplify engine function (#4314) (@1911860538)
- 3ab698d: refactor(recovery): smart error comparison (#4142) (@zeek0x)
- d1a1534: refactor(utils): move util functions to utils.go (#4467) (@zeek0x)
- e3118cc: refactor: for loop can be modernized using range over int (#4392) (@wanghaolong613)
- 488f8c3: refactor: replace magic numbers with named constants in bodyAllowedForStatus (#4529) (@veeceey)
- 9968c4b: refactor: use b.Loop() to simplify the code and improve performance (#4389) (@reddaisyy)
- a85ef5c: refactor: use b.Loop() to simplify the code and improve performance (#4432) (@efcking)
Build process updates
- 61b67de: ci(bot): increase frequency and group updates for dependencies (#4367) (@appleboy)
- fb27ef2: ci(lint): refactor test assertions and linter configuration (#4436) (@appleboy)
- 93ff771: ci(sec): improve type safety and server organization in HTTP middleware (#4437) (@appleboy)
- e88fc89: ci(sec): schedule Trivy security scans to run daily at midnight UTC (#4439) (@appleboy)
- 5e5ff3a: ci: replace vulnerability scanning workflow with Trivy integration (#4421) (@appleboy)
- 00900fb: ci: update CI workflows and standardize Trivy config quotes (#4531) (@appleboy)
- ae3f524: ci: update Go version support to 1.25+ across CI and docs (#4550) (@appleboy)
Documentation updates
- dceb61e: docs(README): add a Trivy security scan badge (#4426) (@appleboy)
- 58135f0: docs(context): add example comments for ShouldBind* methods (#4428) (@AtoriUzawa)
- c221133: docs(context): fix some comments (#4396) (@letreturn)
- 731374f: docs(context): fix wrong function name in comment (#4382) (@goldlinker)
- 4dd00f8: docs(readme): revamp and expand documentation for clarity and completeness (#4362) (@appleboy)
- 1bbbec0: docs: announce Gin 1.11.0 release with blog link (#4363) (@appleboy)
- e292e5c: docs: document and finalize Gin v1.12.0 release (#4551) (@appleboy)
- 7925414: docs: revamp GitHub contribution and support templates (#4364) (@appleboy)
- 6a1d121: docs: revamp contributing guidelines with comprehensive instructions (#4365) (@appleboy)
- 73726dc: docs: update documentation to reflect Go version changes (#4552) (@appleboy)
- f3a5e78: docs: update feature documentation instructions for broken doc link (@appleboy)
Others
- 440eb14: perf(path): replace regex with custom functions in redirectTrailingSlash (#4414) (@1911860538)
- 64a6ed9: perf(recovery): optimize line reading in stack function (#4466) (@1911860538)
- 2e22e50: perf(tree): optimize path parsing using strings.Count (#4246) (@1911860538)
- cad29c5: perf(tree): reduce allocations in findCaseInsensitivePath (#4417) (@arturmelanchyk)
- ed150e7: test(benchmarks): fix the incorrect function name (#4375) (@mengxunQAQ)
- 583db59: test(bytesconv): add tests for empty/nil cases (#4454) (@miladev95)
- fb25834: test(context): use http.StatusContinue constant instead of magic number 100 (#4542) (@mehrdadbn9)
- 19b877f: test(debug): improve the test coverage of debug.go to 100% (#4404) (@zeek0x)
- c358d56: test(gin): Add comprehensive test coverage for ginS package (#4442) (@miladev95)
- f416d1e: test(gin): resolve race conditions in integration tests (#4453) (@Planckbaka)
- 6f1d5fe: test(render): add comprehensive error handling tests (#4541) (@Amirhf1)
- 216a4a7: test(render): add comprehensive tests for MsgPack render (#4537) (@Amirhf1)