gin v1.11.0 版本更新介绍
发布日期: 2025-09-20
版本号: v1.11.0
Gin框架发布了新版本,主要更新包括:新增了更丰富的绑定功能,如支持原生类型绑定和HTTP/3协议;修复了多项关于绑定、上下文处理和并发的错误;增强了依赖安全性和性能,如升级quic-go版本并优化了字符串处理;重构了内部代码以提升可读性和效率;更新了构建配置,将最低Go版本要求提升至1.21;并修订了文档以纠正错误和补充说明。
更新内容 (中文)
更新日志
新增功能
- 6ca8ddb1aed78d9ffaf984e5489111838242fedb: feat(binding): 添加 BindPlain (#3904) (@guonaihong)
- 4ccfa7c275c449990818e46759d5974a953cc1c1: feat(binding): 添加对 unixMilli 和 unixMicro 的支持 (#4190) (@takanuva15)
- 9d7c0e9e1a301f417df9dc89a8cadc3bf9063db2: feat(context): GetXxx 添加对更多 Go 原生类型的支持 (#3633) (@CC11001100)
- fb09c825e8e13134daaa90debfda198520e1b347: feat(context): 添加 SetCookieData (#4240) (@Narita-1095305)
- f05f966a0824b1d302ee556183e2579c91954266: feat(form): 支持表单绑定中集合的默认值 (#4048) (@takanuva15)
- 3cb30679b5e3021db16c776ed7e70d380586e9ce: feat(form): 在表单绑定中添加数组集合格式 (#3986) (@slowhigh)
- 24d67647cb9b4e0bbdcdec7f0c2086e8004e1572: feat(form): 为表单标签反序列化添加自定义字符串切片 (#3970) (#3971) (@bruceNu1l)
- 8791c96960e719ff2f41e24163c5898656cee474: feat(fs): 导出、测试并记录 OnlyFilesFS (#3939) (@joeig)
- 71496abe6836462e2ed70436b7d72ea2a3585417: feat(fs): 实现从 http.FileSystem 加载 HTML (#4053) (@sunshineplan)
- 3ac729dc4a497d360a23b9d7e766c622b3c99f51: feat(gin): 使用 quic-go/quic-go 支持 http3 (#3210) (@thinkerou)
- 4621b7ac982335d9a74432e182dd2bfc6d841431: feat(router): 添加字面冒号支持 (#1432) (#2857) (@wssccc)
- dbd8a2515093ad47cadc5c1fface89861a0b765c: feat: 在
Context中添加AbortWithStatusPureJSON()(#4290) (@ddevsr) - 688a429d19d8c804447bb889d3635e2c31a5564d: feat: 支持运行时自定义 json 编解码器 (#3391) (@timandy)
错误修复
- 8fb3136664254d7c592127f00d52849caba18a67: 撤销 “fix(time): 绑定空值时间 (#4103)” (#4245) (@appleboy)
- e737e3e267beb4dc3bab16cc8be59e3902d98a94: fix(binding): 防止重复解码并在 decodeToml 中添加验证 (#4193) (@revevide)
- 4f339e6a35b163d31b30916b37f4176d385f41bd: fix(context): 修复 Negotiate 中的 YAML 判断逻辑 (#3966) (@RedCrazyGhost)
- 36b0dede4b8c4a67d92c4107cebc5a068364321d: fix(context): 检查 handler 是否为 nil (#3413) (@hktalent)
- e0d46ded6cb6974d55a255ab122d1aa6ca0cd60e: fix(context): 在 initQueryCache() 中验证 URL 非空 (#3969) (@adrianosela)
- dd33ff793861cee3baa77d575ff319119c366f3a: fix(docs): 缺少 go markdown 代码块 (#4266) (@vdusart)
- b38c59de7fef67400a1c98efeae700a689c45783: fix(errors): 将 Unwrap 方法接收者改为值类型 (#4232) (@OrkhanAlikhanov)
- 28e57f58b184b2305ace192e02496bb89f6fd8cb: fix(form): 设置表单字段的默认值 (#4047) (@ahmadSaeedGoda)
- 626d55b0c02937645c21774cacc021713de88604: fix(gin): 在空树上处理方法不允许时不 panic (#4003) (@phsym)
- 7d147928ee232fce156ea7ce8ae6329e148aeb41: fix(gin): gin 模式下的数据竞争警告 (#1580) (@kplachkov)
- c677ccc40a60386565dd0d755efacb85d153feca: fix(go): 无效的 Go 工具链版本 (#3961) (@thinkerou)
- 3319038418656a268c889393cb2dd4224c4469ec: fix(readme): 修复指向英文文档的损坏链接 (#4222) (@eduardo-ax)
- 674522db91d637d179c16c372d87756ea26fa089: fix(time): 绑定空值时间 (#4103) (@ksw2000)
- ea53388e6ee4a6a0a1647b390c56eeed780e7e56: fix(tree): 在通配符类型构建失败时保持 panic 信息一致 (#4077) (@kingcanfish)
- 8763f33c65f7df8be5b9fe7504ab7fcf20abb41d: fix: 防止 HandleContext 中中间件重入问题 (#3987) (@bound2)
- 7a1b655074c313f9491c83bb8ea164cdc4a9afe9: fix: 修复 arm64 上的 sonic 问题 (#4234) (@yashgorana)
- 5826722a87cf5855fcc4b794cbef11612352771d: fix: 版本号不一致 (#4299) (@suwakei)
增强
- 40725d85badd647870df6f9fa7a75ac76341f804: chore(bind): 当错误为
http.MaxBytesError时返回 413 状态码 (#4227) (@ItalyPaleAle) - f875d8728306c2c2c6f504900ab08cd1d8c47f12: chore(context): 测试 context 初始化和 handler 逻辑 (#4087) (@appleboy)
- e7693e67c23005743502962d3bb9839a354d6688: chore(deps): 将 actions/setup-go 从 5 升级到 6 (#4351) (@dependabot[bot])
- afa0c31d97e1b112ccfe7652957f7d8514580c72: chore(deps): 将 github.com/gin-contrib/sse 从 0.1.0 升级到 1.1.0 (#4216) (@dependabot[bot])
- 255af882db4baf0ed6209f1a5471f1663c5d0060: chore(deps): 升级 github.com/go-playground/validator/v10 (#4208) (@dependabot[bot])
- 545fd74379a0b167a918e38626ae5f7eb83fb243: chore(deps): 升级 github.com/go-playground/validator/v10 (#4289) (@dependabot[bot])
- c3c8620a7fb4e09c7845feca4e8e8a8678a2685d: chore(deps): 将 github.com/go-playground/validator/v10 从 10.20.0 升级到 10.22.1 (#4052) (@dependabot[bot])
- cf32d2dcf8c7534f59727c5e213e45f2412c593a: chore(deps): 将 github.com/pelletier/go-toml/v2 从 2.2.2 升级到 2.2.4 (#4212) (@dependabot[bot])
- bb824731032856460aa3ffc23bd90e11bf7d5199: chore(deps): 将 github.com/quic-go/quic-go 从 0.48.2 升级到 0.50.1 (#4197) (@dependabot[bot])
- 61c2b1c28f0c5a754330545e31f02cd6d6f7944e: chore(deps): 将 github.com/quic-go/quic-go 从 0.51.0 升级到 0.52.0 (#4250) (@dependabot[bot])
- b7d6308bcc84066df79a047ae363a6120fe87808: chore(deps): 将 github.com/quic-go/quic-go 从 0.52.0 升级到 0.53.0 (#4281) (@dependabot[bot])
- 077a2f39c85700ba0823f85ed29cec0c8f2cbdfc: chore(deps): 将 github.com/quic-go/quic-go 从 0.53.0 升级到 0.54.0 (#4328) (@dependabot[bot])
- 46150257b3eec60e3e0bf1cee7c03439099aef83: chore(deps): 将 github.com/stretchr/testify 从 1.10.0 升级到 1.11.1 (#4347) (@dependabot[bot])
- a6287825c95821a378a34f8a5c9139ea1f6ebd96: chore(deps): 将 github.com/ugorji/go/codec 从 1.2.12 升级到 1.3.0 (#4268) (@dependabot[bot])
- cc4e11438cd6c0bcc632fe3492d3817dfa21c337: chore(deps): 将 golang.org/x/net 从 0.25.0 升级到 0.27.0 (#4013) (@dependabot[bot])
- 733ee094fc4aaf016fb05820f553eeb0b81d0f1f: chore(deps): 将 golang.org/x/net 从 0.33.0 升级到 0.37.0 (#4178) (@dependabot[bot])
- 56fccc39ec5cbe30e39fa34e67371219354f14cd: chore(deps): 将 golang.org/x/net 从 0.37.0 升级到 0.38.0 (#4221) (@dependabot[bot])
- ef68fa032c0e6ce637db56e89ec734c0de0a9f5e: chore(deps): 将 golang.org/x/net 从 0.38.0 升级到 0.40.0 (#4229) (@dependabot[bot])
- 0a864884de806386e275ee096f681520799911fb: chore(deps): 将 golang.org/x/net 从 0.40.0 升级到 0.41.0 (#4262) (@dependabot[bot])
- ae5be7fcb726ac6417f6b5deb70afd4a274f64f0: chore(deps): 将 golang.org/x/net 从 0.41.0 升级到 0.42.0 (#4297) (@dependabot[bot])
- 4714c2a9a39f0877ccb38089894263f052025a6b: chore(deps): 将 google.golang.org/protobuf 从 1.34.1 升级到 1.36.6 (#4198) (@dependabot[bot])
- 28172fa68206b2ced9df3417fad50bcabd6d9eb6: chore(deps): 将 google.golang.org/protobuf 从 1.36.6 升级到 1.36.8 (#4346) (@dependabot[bot])
- cca98d2d266d3797a8bf70f5903c2fbe32e8bf86: chore(deps): 将 google.golang.org/protobuf 从 1.36.8 升级到 1.36.9 (#4356) (@dependabot[bot])
- 57ec9e603642dd8a48fbd860e1f4fc5de7be37c0: chore(mode): 移除不可能的情况(mode 的空值) (#4303) (@mask-pp)
- 17d0b553eac2a32fe82b06e3b4fa0d0cac3bff57: chore(render): 不再导出 tomlContentType (#4319) (@VarusHsu)
- 32065bbd4298d566d060d234e452bbf44e92161d: chore(response): 防止 Hijack() 运行时 panic (#4295) (@suwakei)
- e2e80f33472bd02094f242da3c3efde2cec0a037: chore(security): 更新 vendor 以修复 CVE (#4121) (@xlgao-zju)
- 3f818c3fa69e03feb46d2b49d2a8084c425cbed6: chore(security): 将 quic-go 版本升级到 0.48.2 (#4127) (@appleboy)
- 334160bab772f6f93767b870f9d07c176cd4aa2b: chore(tree): 将自定义 ‘min’ 替换为官方版本 (#3975) (@EndlessParadox1)
- d00e6a5695c14933081faaba74e92d95cca9377f: chore: 修复注释中的一些函数名 (#4131) (@yangquanshi)
- 90cf4602698dcbce18df3165b2d24e2940670a41: chore: 更新 Go 版本和依赖项以改进兼容性 (#4187) (@appleboy)
重构
- 8dd088927ab50b3b37be1f7ba14931c8eddafe07: refactor(binding): 使用 strings.Cut 替换 strings.Index (#3522) (@lgbgbl)
- e46bd521859fdfc83c508f1d42c92cb7f91e9fcb: refactor(context): 为 SaveUploadedFile 方法添加可选的权限参数 (#4068) (#4088) (@haesuo566)
- 41d8591eb16bf23732de9ae2b699d6cae54c2ae8: refactor(context): 将
Keys类型重构为map[any]any(#3963) (@flc1125) - 647311aba203dd7262b24f973503e7689e00389d: refactor(context): 重构 context 处理并提高测试健壮性 (#4066) (@kingcanfish)
- e4c2a2762448fbd094463a2022e97bc5be98ec63: refactor(context): 在 get 方法中移除未使用的 Context 依赖 (#4304) (@1911860538)
- c8a3adc65703d8958265c07689662e54f037038c: refactor(context): 简化 “GetType()” 函数 (#4080) (@KaymeKaydex)
- a4baac6e5e030ca707e519a3bf209d25699e3902: refactor(context): 在 SaveUploadedFile 中避免重复使用 filepath.Dir (#4181) (@nezhafan)
- e30123ad7314411664a693f23ed0ade498ccdaf0: refactor(recovery): 将 Authorization 头部掩码提取到 maskAuthorization 函数中 (#4143) (@zeek0x)
- e198f6e859220afd35bc2fb2fd5d404d7c0882ca: refactor(render): 从 writeHeader 中移除 headers 参数 (#4353) (@1911860538)
- 3f5b0afa2ac85ea79638ca08f4140ce64b8246e5: refactor(slice): 简化 SliceValidationError Error 方法 (#3910) (@1911860538)
- 9b1e3533e2d17b6152b05efeab8280f450e68e52: refactor(tree): 在 node.insertChild 中将 string(/) 替换为 “/” (#4354) (@1911860538)
- 848e1cdd0d1525ce0a99b7e6a2a1cf0d84d76156: refactor: 在类型声明中将 interface{} 替换为 any (#4249) (@flc1125)
- 67c9d4ee110e9adfe33063ef847dba56717c148a: refactor: 在 AsciiJSON Render 中用 unicode.MaxASCII 替换魔术数字 128 (#4224) (@1911860538)
构建流程更新
- da372fc77840b3badf4efef5ec2d203cdc73f1db: build(deps): 将 github.com/bytedance/sonic 从 v1.13.2 升级到 v1.14.0 (#4342) (@flc1125)
- b987b6206f13a4c244739e4f4e6c6a2b7dfff9d3: build: 在 golang 中自动更新 package (#4311) (@ddevsr)
- 7e298066baab19316aa2ffc946f1bbc44a68a607: build: 将 Gin 最低 Go 版本更新为 1.21 (#3960) (@appleboy)
- 40131af1243ef90e026859bf8ff9c30a5a230351: ci(Makefile): 为 make 目标添加帮助和描述 (#3964) (@tr1sm0s1n)
- c4287b1300363cb3dc2c8408299d3ba6deded485: ci(golangci-lint): 更新配置并修复 lint 问题 (#4247) (@flc1125)
- 02c1144f312eaf18767475a578bc421ddbcc4b82: ci(lint): 启用 perfsprint linter (#4090) (@mmorel-35)
- 5f55c6a711376c77834bc6b25d35c8985de1d311: ci(lint): 启用 testifylint linter (#4010) (@mmorel-35)
- e8d34d053f7008858886b8e4f76b3e8564105870: ci(lint): 启用 usestdlibvars linter (#4091) (@mmorel-35)
- 23d6961aeb9d2670a7b36c77cb180f479e220580: ci(lint): 更新工作流并改进测试请求一致性 (#4126) (@appleboy)
- 3b28645dc95d58e0df36b8aff7a6c64f7c0ca5e9: ci: 在 GitHub Actions 中添加 Go 版本 1.24 (#4154) (@appleboy)
- cb000f570c127a503535fa5be9c0237823ea7e4d: ci: 将 Trivy 漏洞扫描集成到 CI 工作流中 (#4359) (@appleboy)
- 2119046230f0119c7c88f86a6b441d9d3aaad03e: ci: 支持 Go 1.25 (#4341) (@flc1125)
- b1c1e7b572f76071fb0e0e7884a0697e0458aa7c: ci: 更新 Go 版本要求并移除测试文件 (#3957) (@appleboy)
文档更新
- 7858527c8c2a15bddf27ea71162f8f70c82f2cdf: docs(changelog): 更新 Gin v1.10.1 的发布说明 (#4360) (@appleboy)
- 6ad6205e9c94a4b8a320219e28c37c29d22a7a2c: docs(changelog): 将 Gin 升级到 v1.11.0 并添加发布说明 (#4361) (@appleboy)
- 9708475b3b2a4e1ac09cdf31f34398cab1b3e277: docs(context): 修复 AbortWithStatusPureJSON 注释中的拼写错误 (#4310) (@1911860538)
- ad740d508f3e98b53ecafda35b66e6a32f6758ac: docs(context): 修复注释中的一些函数名 (#4079) (@wangjingcun)
- e60113dc9531779a15dcb761655d986a56273ea2: docs(engine): 修复
With的注释 (#3955) (@flc1125) - 9d11234efec1e5517b2887a6e7dfbc9c017bc52c: docs(gin): 将损坏的文档链接替换为有效链接 (#4064) (@M3DZIK)
- f5f5da8fa09d12a22225c493fa8191fb14bdd5bf: docs(gin): 更新指向 dont-trust-all-proxies 部分的链接 (#3938) (#3945) (@codespearhead)
- b080116a7f5c71f023e1059ebb9e99a799938909: docs(readme): 添加葡萄牙语文档。 (#4078) (@YlanzinhoY)
- 19f5a13fb421fd71c10a06f244734bba317f63a6: docs(readme): 添加 gin-gonic/contrib (#4134) (@123liuziming)
- a569ed8f26a13b10c02920de103eba79c7102cd7: docs(readme): 修复语言和移动链接 (#3962) (@truecrunchyfrog)
- 64ead9e6bd924d431f4dd612349bc5e13300e6fc: docs(readme): 将 godoc 替换为 pkg (#3985) (@mengzhuo)
- 42f93283cf4a37bf16ac045284b335a24b44aeca: docs(test): 改进 test_helpers.go 中的 GoDoc (#4270) (@suwakei)
- 1b53a477904c783c82cd6cc402aece4b9558a66e: docs: 修复 doc/doc.md 中的英语语法错误和尴尬句子结构 (#4207) (@boyczuk)
- 3afff295a2e638075fcfbd2c38ee89a4263637d3: docs: 添加 Upd 语言列表 (#4211) (@andreybolonin)
- 4bdcd9d0f1154ea5e07fbe7855dd09ee14a6f1e9: docs: 添加可用的
ID文档 (#4287) (@ddevsr) - bdc1ad7987b6931801af9d50e2df25667fdfaaf4: docs: 在 doc.go 中添加注释 (#4274) (@suwakei)
- ad4f436ae9823ec577b746d0560201557f8c9691: docs: 更正注释中的冠词用法 (#4301) (@Caplost)
- 1eb827240e520804ea83b1aafcbaf7ba728b81dd: docs: 修复 X-Real-IP 的大小写错误 (#4185) (@nezhafan)
- 49e9137c68e6dfaa529a2d0c9fe64d9e69a8554e: docs: 修复注释 (#4205) (@nezhafan)
- f2c861a24f204f53dd6e6755b6d4efece7e373ea: docs: 修复路由组示例代码 (#4020) (@demouth)
- 9c081de9cdd1948f521d47d170d18cbc2981c33a: docs: 修复 Gin 快速入门中的拼写错误 (#3997) (@demouth)
- a9c5b36578be3bb817c3578d13de666b0d4c8549: docs: 小幅修改 (#4261) (@eqsdxr)
- 299c6f30e3df4c5a257c517a91f421ff3ea63a8e: docs: 修剪一些空白字符 (#4070) (@tsukasaI)
- 490accf5d7d49138f0af806318826d92513b1395: docs: 更新 Gin v1.10.0 的文档和发布说明 (#3953) (@appleboy)
- 76dd08d512504b80ef76a76c9e6bd1831e121b71: docs: README.md 中错误的徽章工作流 (#4286) (@ddevsr)
其他
- cf4775283ec30cda685355b5016c5abd2a56884e: chroe: 将 yaml 包迁移到 github.com/goccy/go-yaml (#4272) (@milhamsuryapratama)
- 8f7c340577e19245827f7ba71ef3e0143cc7eeee: context_test.go: 修复无用的断言 (#4115) (@deining)
- ebe5e2a6bfdca50fd44074b470ad486392e2933f: fix(golangci.yml): 将 fiximports 移至 goimports 部分,并将 exportloopref 替换为 copyloopvar (#4167) (@1911860538)
- 3d8e288c64aa3d3064df6264ab1b5445a28b709d: perf(all): 使用 strings.Cut 替换 strings.SplitN (#4239) (@1911860538)
- f9bd00a6b7939b941fde3fdd239367f4a7d6b137: perf(context): 优化 getMapFromFormData 性能 (#4339) (@1911860538)
- 3c12d2a80e40930632fc4a4a4e1a45140f33fb12: perf(recover): 在函数中用 strings 替换 bytes 以获得更好性能 (#4252) (@1911860538)
- 45b805f6d59ba0b4f315adffe81ed4a82a51a591: perf(recovery): 优化 CustomRecoveryWithWriter 的日志输出 (#4258) (@1911860538)
- 0eb99493c28b09cee339061b0d8a11c9a4f31399: perf: 通过使用 fmt.Appendf 和重用临时缓冲区来优化 AsciiJSON.Render 方法 (#4175) (@1911860538)
- 77d70e5858278193abfab732164b0c1415d8d4ba: refactor(internal/bytesconv): 用 crypto/rand 和 rand.Int63 替换 rand 的使用 (#4259) (@1911860538)
- c8af82af15dd00d684113334d12e05f589f33ff3: test(context): 在 SaveUploadedFile 测试中添加已上传文件的清理 (#4248) (@flc1125)
- dab5944a7bca8ae37d947dda02ac591afc1177d3: test(context): 为
Context.File()方法添加全面的单元测试 (#4307) (@Caplost) - 2e2bd1f408fdaa5e522bc56972e3f109fd7502fd: test(internal/fs): 修复测试函数名 (#4235) (@salimabsi)
- a4ac275e079d46d493965491d686bfe72d121e85: test(route): 为 routergroup 添加一些测试 (#4291) (@chenhuiluo)
- da67cc1b988ed6498eccaecb989467e87b555dfd: test: 修复 lint 失败 (#4244) (@sid-maddy)
更新内容 (原始)
Changelog
Features
- 6ca8ddb1aed78d9ffaf984e5489111838242fedb: feat(binding): add BindPlain (#3904) (@guonaihong)
- 4ccfa7c275c449990818e46759d5974a953cc1c1: feat(binding): add support for unixMilli and unixMicro (#4190) (@takanuva15)
- 9d7c0e9e1a301f417df9dc89a8cadc3bf9063db2: feat(context): GetXxx added support for more go native types (#3633) (@CC11001100)
- fb09c825e8e13134daaa90debfda198520e1b347: feat(context): add SetCookieData (#4240) (@Narita-1095305)
- f05f966a0824b1d302ee556183e2579c91954266: feat(form): Support default values for collections in form binding (#4048) (@takanuva15)
- 3cb30679b5e3021db16c776ed7e70d380586e9ce: feat(form): add array collection format in form binding (#3986) (@slowhigh)
- 24d67647cb9b4e0bbdcdec7f0c2086e8004e1572: feat(form): add custom string slice for form tag unmarshal (#3970) (#3971) (@bruceNu1l)
- 8791c96960e719ff2f41e24163c5898656cee474: feat(fs): Export, test and document OnlyFilesFS (#3939) (@joeig)
- 71496abe6836462e2ed70436b7d72ea2a3585417: feat(fs): Implement loading HTML from http.FileSystem (#4053) (@sunshineplan)
- 3ac729dc4a497d360a23b9d7e766c622b3c99f51: feat(gin): support http3 using quic-go/quic-go (#3210) (@thinkerou)
- 4621b7ac982335d9a74432e182dd2bfc6d841431: feat(router): add literal colon support (#1432) (#2857) (@wssccc)
- dbd8a2515093ad47cadc5c1fface89861a0b765c: feat: added
AbortWithStatusPureJSON()inContext(#4290) (@ddevsr) - 688a429d19d8c804447bb889d3635e2c31a5564d: feat: support custom json codec at runtime (#3391) (@timandy)
Bug fixes
- 8fb3136664254d7c592127f00d52849caba18a67: Revert “fix(time): binding time with empty value (#4103)” (#4245) (@appleboy)
- e737e3e267beb4dc3bab16cc8be59e3902d98a94: fix(binding): prevent duplicate decoding and add validation in decodeToml (#4193) (@revevide)
- 4f339e6a35b163d31b30916b37f4176d385f41bd: fix(context): YAML judgment logic in Negotiate (#3966) (@RedCrazyGhost)
- 36b0dede4b8c4a67d92c4107cebc5a068364321d: fix(context): check handler is nil (#3413) (@hktalent)
- e0d46ded6cb6974d55a255ab122d1aa6ca0cd60e: fix(context): verify URL is Non-nil in initQueryCache() (#3969) (@adrianosela)
- dd33ff793861cee3baa77d575ff319119c366f3a: fix(docs): missing go markdown codeblock (#4266) (@vdusart)
- b38c59de7fef67400a1c98efeae700a689c45783: fix(errors): change Unwrap method receiver to value type (#4232) (@OrkhanAlikhanov)
- 28e57f58b184b2305ace192e02496bb89f6fd8cb: fix(form): Set default value for form fields (#4047) (@ahmadSaeedGoda)
- 626d55b0c02937645c21774cacc021713de88604: fix(gin): Do not panic when handling method not allowed on empty tree (#4003) (@phsym)
- 7d147928ee232fce156ea7ce8ae6329e148aeb41: fix(gin): data race warning for gin mode (#1580) (@kplachkov)
- c677ccc40a60386565dd0d755efacb85d153feca: fix(go): invalid Go toolchain version (#3961) (@thinkerou)
- 3319038418656a268c889393cb2dd4224c4469ec: fix(readme): fix broken link to English documentation (#4222) (@eduardo-ax)
- 674522db91d637d179c16c372d87756ea26fa089: fix(time): binding time with empty value (#4103) (@ksw2000)
- ea53388e6ee4a6a0a1647b390c56eeed780e7e56: fix(tree): Keep panic infos consistent when wildcard type build faild (#4077) (@kingcanfish)
- 8763f33c65f7df8be5b9fe7504ab7fcf20abb41d: fix: prevent middleware re-entry issue in HandleContext (#3987) (@bound2)
- 7a1b655074c313f9491c83bb8ea164cdc4a9afe9: fix: sonic on arm64 (#4234) (@yashgorana)
- 5826722a87cf5855fcc4b794cbef11612352771d: fix: version number discrepancy (#4299) (@suwakei)
Enhancements
- 40725d85badd647870df6f9fa7a75ac76341f804: chore(bind): return 413 status code when error is
http.MaxBytesError(#4227) (@ItalyPaleAle) - f875d8728306c2c2c6f504900ab08cd1d8c47f12: chore(context): test context initialization and handler logic (#4087) (@appleboy)
- e7693e67c23005743502962d3bb9839a354d6688: chore(deps): bump actions/setup-go from 5 to 6 (#4351) (@dependabot[bot])
- afa0c31d97e1b112ccfe7652957f7d8514580c72: chore(deps): bump github.com/gin-contrib/sse from 0.1.0 to 1.1.0 (#4216) (@dependabot[bot])
- 255af882db4baf0ed6209f1a5471f1663c5d0060: chore(deps): bump github.com/go-playground/validator/v10 (#4208) (@dependabot[bot])
- 545fd74379a0b167a918e38626ae5f7eb83fb243: chore(deps): bump github.com/go-playground/validator/v10 (#4289) (@dependabot[bot])
- c3c8620a7fb4e09c7845feca4e8e8a8678a2685d: chore(deps): bump github.com/go-playground/validator/v10 from 10.20.0 to 10.22.1 (#4052) (@dependabot[bot])
- cf32d2dcf8c7534f59727c5e213e45f2412c593a: chore(deps): bump github.com/pelletier/go-toml/v2 from 2.2.2 to 2.2.4 (#4212) (@dependabot[bot])
- bb824731032856460aa3ffc23bd90e11bf7d5199: chore(deps): bump github.com/quic-go/quic-go from 0.48.2 to 0.50.1 (#4197) (@dependabot[bot])
- 61c2b1c28f0c5a754330545e31f02cd6d6f7944e: chore(deps): bump github.com/quic-go/quic-go from 0.51.0 to 0.52.0 (#4250) (@dependabot[bot])
- b7d6308bcc84066df79a047ae363a6120fe87808: chore(deps): bump github.com/quic-go/quic-go from 0.52.0 to 0.53.0 (#4281) (@dependabot[bot])
- 077a2f39c85700ba0823f85ed29cec0c8f2cbdfc: chore(deps): bump github.com/quic-go/quic-go from 0.53.0 to 0.54.0 (#4328) (@dependabot[bot])
- 46150257b3eec60e3e0bf1cee7c03439099aef83: chore(deps): bump github.com/stretchr/testify from 1.10.0 to 1.11.1 (#4347) (@dependabot[bot])
- a6287825c95821a378a34f8a5c9139ea1f6ebd96: chore(deps): bump github.com/ugorji/go/codec from 1.2.12 to 1.3.0 (#4268) (@dependabot[bot])
- cc4e11438cd6c0bcc632fe3492d3817dfa21c337: chore(deps): bump golang.org/x/net from 0.25.0 to 0.27.0 (#4013) (@dependabot[bot])
- 733ee094fc4aaf016fb05820f553eeb0b81d0f1f: chore(deps): bump golang.org/x/net from 0.33.0 to 0.37.0 (#4178) (@dependabot[bot])
- 56fccc39ec5cbe30e39fa34e67371219354f14cd: chore(deps): bump golang.org/x/net from 0.37.0 to 0.38.0 (#4221) (@dependabot[bot])
- ef68fa032c0e6ce637db56e89ec734c0de0a9f5e: chore(deps): bump golang.org/x/net from 0.38.0 to 0.40.0 (#4229) (@dependabot[bot])
- 0a864884de806386e275ee096f681520799911fb: chore(deps): bump golang.org/x/net from 0.40.0 to 0.41.0 (#4262) (@dependabot[bot])
- ae5be7fcb726ac6417f6b5deb70afd4a274f64f0: chore(deps): bump golang.org/x/net from 0.41.0 to 0.42.0 (#4297) (@dependabot[bot])
- 4714c2a9a39f0877ccb38089894263f052025a6b: chore(deps): bump google.golang.org/protobuf from 1.34.1 to 1.36.6 (#4198) (@dependabot[bot])
- 28172fa68206b2ced9df3417fad50bcabd6d9eb6: chore(deps): bump google.golang.org/protobuf from 1.36.6 to 1.36.8 (#4346) (@dependabot[bot])
- cca98d2d266d3797a8bf70f5903c2fbe32e8bf86: chore(deps): bump google.golang.org/protobuf from 1.36.8 to 1.36.9 (#4356) (@dependabot[bot])
- 57ec9e603642dd8a48fbd860e1f4fc5de7be37c0: chore(mode): remove impossible case (empty value for mode) (#4303) (@mask-pp)
- 17d0b553eac2a32fe82b06e3b4fa0d0cac3bff57: chore(render): do not export tomlContentType anymore (#4319) (@VarusHsu)
- 32065bbd4298d566d060d234e452bbf44e92161d: chore(response): prevention of Hijack() runtime panics (#4295) (@suwakei)
- e2e80f33472bd02094f242da3c3efde2cec0a037: chore(security): update vendor to fix CVE (#4121) (@xlgao-zju)
- 3f818c3fa69e03feb46d2b49d2a8084c425cbed6: chore(security): upgrade quic-go version to 0.48.2 (#4127) (@appleboy)
- 334160bab772f6f93767b870f9d07c176cd4aa2b: chore(tree): replace the self-defined ‘min’ to official one (#3975) (@EndlessParadox1)
- d00e6a5695c14933081faaba74e92d95cca9377f: chore: fix some function names in comment (#4131) (@yangquanshi)
- 90cf4602698dcbce18df3165b2d24e2940670a41: chore: update Go versions and dependencies for improved compatibility (#4187) (@appleboy)
Refactor
- 8dd088927ab50b3b37be1f7ba14931c8eddafe07: refactor(binding): use strings.Cut to replace strings.Index (#3522) (@lgbgbl)
- e46bd521859fdfc83c508f1d42c92cb7f91e9fcb: refactor(context): add an optional permission parameter to the SaveUploadedFile method (#4068) (#4088) (@haesuo566)
- 41d8591eb16bf23732de9ae2b699d6cae54c2ae8: refactor(context): refactor
Keystype tomap[any]any(#3963) (@flc1125) - 647311aba203dd7262b24f973503e7689e00389d: refactor(context): refactor context handling and improve test robustness (#4066) (@kingcanfish)
- e4c2a2762448fbd094463a2022e97bc5be98ec63: refactor(context): remove unused Context dependency in get method (#4304) (@1911860538)
- c8a3adc65703d8958265c07689662e54f037038c: refactor(context): simplify “GetType()” functions (#4080) (@KaymeKaydex)
- a4baac6e5e030ca707e519a3bf209d25699e3902: refactor(context):Avoid using filepath.Dir twice in SaveUploadedFile (#4181) (@nezhafan)
- e30123ad7314411664a693f23ed0ade498ccdaf0: refactor(recovery): extract Authorization header masking into maskAuthorization func (#4143) (@zeek0x)
- e198f6e859220afd35bc2fb2fd5d404d7c0882ca: refactor(render): remove headers parameter from writeHeader (#4353) (@1911860538)
- 3f5b0afa2ac85ea79638ca08f4140ce64b8246e5: refactor(slice): simplify SliceValidationError Error method (#3910) (@1911860538)
- 9b1e3533e2d17b6152b05efeab8280f450e68e52: refactor(tree): replace string(/) with “/” in node.insertChild (#4354) (@1911860538)
- 848e1cdd0d1525ce0a99b7e6a2a1cf0d84d76156: refactor: replace interface{} with any in type declarations (#4249) (@flc1125)
- 67c9d4ee110e9adfe33063ef847dba56717c148a: refactor: replace magic number 128 with unicode.MaxASCII in AsciiJSON Render (#4224) (@1911860538)
Build process updates
- da372fc77840b3badf4efef5ec2d203cdc73f1db: build(deps): upgrade github.com/bytedance/sonic from v1.13.2 to v1.14.0 (#4342) (@flc1125)
- b987b6206f13a4c244739e4f4e6c6a2b7dfff9d3: build: make automatically update package in golang (#4311) (@ddevsr)
- 7e298066baab19316aa2ffc946f1bbc44a68a607: build: update Gin minimum Go version to 1.21 (#3960) (@appleboy)
- 40131af1243ef90e026859bf8ff9c30a5a230351: ci(Makefile): added help and descriptions to targets (#3964) (@tr1sm0s1n)
- c4287b1300363cb3dc2c8408299d3ba6deded485: ci(golangci-lint): update configuration and fix lint issues (#4247) (@flc1125)
- 02c1144f312eaf18767475a578bc421ddbcc4b82: ci(lint): enable perfsprint linter (#4090) (@mmorel-35)
- 5f55c6a711376c77834bc6b25d35c8985de1d311: ci(lint): enable testifylint linter (#4010) (@mmorel-35)
- e8d34d053f7008858886b8e4f76b3e8564105870: ci(lint): enable usestdlibvars linter (#4091) (@mmorel-35)
- 23d6961aeb9d2670a7b36c77cb180f479e220580: ci(lint): update workflows and improve test request consistency (#4126) (@appleboy)
- 3b28645dc95d58e0df36b8aff7a6c64f7c0ca5e9: ci: add go version 1.24 to GitHub Actions (#4154) (@appleboy)
- cb000f570c127a503535fa5be9c0237823ea7e4d: ci: integrate Trivy vulnerability scanning into CI workflow (#4359) (@appleboy)
- 2119046230f0119c7c88f86a6b441d9d3aaad03e: ci: support Go 1.25 (#4341) (@flc1125)
- b1c1e7b572f76071fb0e0e7884a0697e0458aa7c: ci: update Go version requirements and remove test files (#3957) (@appleboy)
Documentation updates
- 7858527c8c2a15bddf27ea71162f8f70c82f2cdf: docs(changelog): update release notes for Gin v1.10.1 (#4360) (@appleboy)
- 6ad6205e9c94a4b8a320219e28c37c29d22a7a2c: docs(changelog): upgrade Gin to v1.11.0 and add release notes (#4361) (@appleboy)
- 9708475b3b2a4e1ac09cdf31f34398cab1b3e277: docs(context): fix AbortWithStatusPureJSON comment typo (#4310) (@1911860538)
- ad740d508f3e98b53ecafda35b66e6a32f6758ac: docs(context): fix some function names in comment (#4079) (@wangjingcun)
- e60113dc9531779a15dcb761655d986a56273ea2: docs(engine): fix comments for the
With(#3955) (@flc1125) - 9d11234efec1e5517b2887a6e7dfbc9c017bc52c: docs(gin): Replace broken link to documentation with valid (#4064) (@M3DZIK)
- f5f5da8fa09d12a22225c493fa8191fb14bdd5bf: docs(gin): update link to dont-trust-all-proxies section (#3938) (#3945) (@codespearhead)
- b080116a7f5c71f023e1059ebb9e99a799938909: docs(readme): add Portuguese documentation. (#4078) (@YlanzinhoY)
- 19f5a13fb421fd71c10a06f244734bba317f63a6: docs(readme): add gin-gonic/contrib (#4134) (@123liuziming)
- a569ed8f26a13b10c02920de103eba79c7102cd7: docs(readme): fix language and moved link (#3962) (@truecrunchyfrog)
- 64ead9e6bd924d431f4dd612349bc5e13300e6fc: docs(readme): replace godoc with pkg (#3985) (@mengzhuo)
- 42f93283cf4a37bf16ac045284b335a24b44aeca: docs(test): improved GoDoc in test_helpers.go (#4270) (@suwakei)
- 1b53a477904c783c82cd6cc402aece4b9558a66e: docs: Fixing English grammar mistakes and awkward sentence structure in doc/doc.md (#4207) (@boyczuk)
- 3afff295a2e638075fcfbd2c38ee89a4263637d3: docs: add Upd language list (#4211) (@andreybolonin)
- 4bdcd9d0f1154ea5e07fbe7855dd09ee14a6f1e9: docs: added available
IDdocumentation (#4287) (@ddevsr) - bdc1ad7987b6931801af9d50e2df25667fdfaaf4: docs: added comment in doc.go (#4274) (@suwakei)
- ad4f436ae9823ec577b746d0560201557f8c9691: docs: correct article usage in comments (#4301) (@Caplost)
- 1eb827240e520804ea83b1aafcbaf7ba728b81dd: docs: fix case error of X-Real-IP (#4185) (@nezhafan)
- 49e9137c68e6dfaa529a2d0c9fe64d9e69a8554e: docs: fix comment (#4205) (@nezhafan)
- f2c861a24f204f53dd6e6755b6d4efece7e373ea: docs: fix route group example code (#4020) (@demouth)
- 9c081de9cdd1948f521d47d170d18cbc2981c33a: docs: fix typo in Gin Quick Start (#3997) (@demouth)
- a9c5b36578be3bb817c3578d13de666b0d4c8549: docs: small changes (#4261) (@eqsdxr)
- 299c6f30e3df4c5a257c517a91f421ff3ea63a8e: docs: trimmed some white spaces (#4070) (@tsukasaI)
- 490accf5d7d49138f0af806318826d92513b1395: docs: update documentation and release notes for Gin v1.10.0 (#3953) (@appleboy)
- 76dd08d512504b80ef76a76c9e6bd1831e121b71: docs: wrong badge workflow in README.md (#4286) (@ddevsr)
Others
- cf4775283ec30cda685355b5016c5abd2a56884e: chroe: migrate yaml package to github.com/goccy/go-yaml (#4272) (@milhamsuryapratama)
- 8f7c340577e19245827f7ba71ef3e0143cc7eeee: context_test.go: fix useless asserts (#4115) (@deining)
- ebe5e2a6bfdca50fd44074b470ad486392e2933f: fix(golangci.yml): move fiximports to goimports section and replace exportloopref with copyloopvar (#4167) (@1911860538)
- 3d8e288c64aa3d3064df6264ab1b5445a28b709d: perf(all): use strings.Cut to replace strings.SplitN (#4239) (@1911860538)
- f9bd00a6b7939b941fde3fdd239367f4a7d6b137: perf(context): optimize getMapFromFormData performance (#4339) (@1911860538)
- 3c12d2a80e40930632fc4a4a4e1a45140f33fb12: perf(recover): replace bytes with strings in function for better performance (#4252) (@1911860538)
- 45b805f6d59ba0b4f315adffe81ed4a82a51a591: perf(recovery): optimize the log output of CustomRecoveryWithWriter (#4258) (@1911860538)
- 0eb99493c28b09cee339061b0d8a11c9a4f31399: perf: optimize AsciiJSON.Render method by using fmt.Appendf and reusing temp buffer (#4175) (@1911860538)
- 77d70e5858278193abfab732164b0c1415d8d4ba: refactor(internal/bytesconv): replace rand usage with crypto/rand and rand.Int63 (#4259) (@1911860538)
- c8af82af15dd00d684113334d12e05f589f33ff3: test(context): add cleanup for uploaded file in SaveUploadedFile test (#4248) (@flc1125)
- dab5944a7bca8ae37d947dda02ac591afc1177d3: test(context): add comprehensive unit tests for
Context.File()method (#4307) (@Caplost) - 2e2bd1f408fdaa5e522bc56972e3f109fd7502fd: test(internal/fs): fix test function name (#4235) (@salimabsi)
- a4ac275e079d46d493965491d686bfe72d121e85: test(route): add some test for routergroup (#4291) (@chenhuiluo)
- da67cc1b988ed6498eccaecb989467e87b555dfd: test: fix lint failures (#4244) (@sid-maddy)