Files
2025-11-29 17:59:34 +08:00

56 KiB

Releases

Version history for this repository (28 releases).

v1.11.0: v1.11.0

Published: 2025-09-20

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() in Context (#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 Keys type to map[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 ID documentation (#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)

View on GitHub


v1.10.1: v1.10.1

Published: 2025-05-20

Changelog

Refactor

  • b5af7796535d97d9c7af42539af01d787fcb3b4d: refactor: strengthen HTTPS security and improve code organization (@appleboy)

View on GitHub


v1.10.0: v1.10.0

Published: 2024-05-07

Changelog

Features

  • 5f458dd1a6d631f324e4af9a4f5429ffdf199342: feat(auth): add proxy-server authentication (#3877) (@EndlessParadox1)
  • 7a865dcf1dbe6ec52e074b1ddce830d278eb72cf: feat(bind): ShouldBindBodyWith shortcut and change doc (#3871) (@RedCrazyGhost)
  • a18219566ca25fc51e6d2886bed849c6c3a0cd12: feat(binding): Support custom BindUnmarshaler for binding. (#3933) (@dkkb)
  • fd1faaded01aef14a3955ec076f1cbeb9cb87775: feat(binding): support override default binding implement (#3514) (@ssfyn)
  • ac5e84d93ce34359bfd2f346cb2971ea754d83e3: feat(engine): Added OptionFunc and With (#3572) (@flc1125)
  • c6ae2e69666a2b36203b29650ee75d172c725c66: feat(logger): ability to skip logs based on user-defined logic (#3593) (@palvaneh)

Bug fixes

  • d4e413648824333726ef65de5defc457e9dbf095: Revert "fix(uri): query binding bug (#3236)" (#3899) (@appleboy)
  • 3dc1cd6572b4e3a0cd170a15debe546c2c72294f: fix(binding): binding error while not upload file (#3819) (#3820) (@clearcodecn)
  • 82bcd6d39bfe9c22032764ff3b0b6f8ef1673e49: fix(binding): dereference pointer to struct (#3199) (@echovl)
  • 2b1da2b0b38dfc5d5841266037c0c8b249eca1dd: fix(context): make context Value method adhere to Go standards (#3897) (@FarmerChillax)
  • f70dd00b00bc0a46cb18b55bfe1f918d5d29b511: fix(engine): fix unit test (#3878) (@flc1125)
  • 86ff4a64c7efe1a1c875529835eeef9e15de1e86: fix(header): Allow header according to RFC 7231 (HTTP 405) (#3759) (@Crocmagnon)
  • 09f8224593e31edf3c58ab3f13bc31ef53473733: fix(route): Add fullPath in context copy (#3784) (@KarthikReddyPuli)
  • 9f598a31aafb92d675f38f1c8371e4ac76f858bf: fix(router): catch-all conflicting wildcard (#3812) (@FirePing32)
  • 4a40f8f1a49b9086b461d97e167c3b9628d8b923: fix(sec): upgrade golang.org/x/crypto to 0.17.0 (#3832) (@chncaption)
  • 386d244068db3693f938db4ead6d1f5f85942e3f: fix(tree): correctly expand the capacity of params (#3502) (@georgijd-form3)
  • 8790d08909fc4d193c6c787c9c72f3089168f411: fix(uri): query binding bug (#3236) (@illiafox)
  • 44d0dd70924dd154e3b98bc340accc53484efa9c: fix: Add pointer support for url query params (#3659) (#3666) (@omkar-foss)
  • 646312aef6a34095476ac846b0920db5fb24b2ea: fix: protect Context.Keys map when call Copy method (#3873) (@kingcanfish)

Enhancements

  • d4a64265f21993368c90602c18e778bf04ef36db: chore(CI): update release args (#3595) (@qloog)
  • bb3519d26f52835cf00e5e430b52651a9c378c97: chore(IP): add TrustedPlatform constant for Fly.io. (#3839) (@ab)
  • 1b3c0859693fc85290c01ba098b1440d4776549f: chore(debug): add ability to override the debugPrint statement (#2337) (@josegonzalez)
  • a64286a7760be2031209686ce4d36e99d42dd419: chore(deps): update dependencies to latest versions (#3835) (@appleboy)
  • 9c61295efeea99f6c9d1722294f1bf61d8e464d6: chore(header): Add support for RFC 9512: application/yaml (#3851) (@vincentbernat)
  • a481ee2897af1e368de5c919fbeb21b89aa26fc7: chore(http): use white color for HTTP 1XX (#3741) (@viralparmarme)
  • c964ad370bbe007f1b18a7570f058a66f05fbe1f: chore(optimize): the ShouldBindUri method of the Context struct (#3911) (@1911860538)
  • 739d2d9c80e0298dafb5df1c30bae35d63935d6c: chore(perf): Optimize the Copy method of the Context struct (#3859) (@1911860538)
  • 3ea8bd99fbb4e499d70a0c8e1ce2ce4b7c6348b6: chore(refactor): modify interface check way (#3855) (@demoManito)
  • ab8042e9e5370bbe0e93ea5adc6e74ae4c5df95e: chore(request): check reader if it's nil before reading (#3419) (@noahyao1024)
  • 0d9dbbb44551a872d30fd89d4d55ba0515d646fd: chore(security): upgrade Protobuf for CVE-2024-24786 (#3893) (@Fotkurz)
  • ecdbbbe9483dd12222f2085f717a2c7cb5ac55fe: chore: refactor CI and update dependencies (#3848) (@appleboy)
  • 39089af62535b27aa63608f341c0a339aa88f64e: chore: refactor configuration files for better readability (#3951) (@appleboy)
  • 160c1730efd30046239c802d5b9f895a708c3f4c: chore: update GitHub Actions configuration (#3792) (@appleboy)
  • 0397e5e0c0f8f8176c29f7edd8f1bff8e45df780: chore: update changelog categories and improve documentation (#3917) (@appleboy)
  • 62b50cfbc0de877207ff74c160a23dff6394f563: chore: update dependencies to latest versions (#3694) (@appleboy)
  • 638aa19e7d30513f7bc777c62ff8558fd5f90ea5: chore: update external dependencies to latest versions (#3950) (@appleboy)
  • c6f90df4e0c888c69524307cc35952ec2e7ead41: chore: update various Go dependencies to latest versions (#3901) (@appleboy)

Build process updates

  • 78f4687875d72d10392f8a77008cbefdec4c0aa0: build(codecov): Added a codecov configuration (#3891) (@flc1125)
  • 56dc72c4d5b1076fc9c6b81f57299739c11910b8: ci(Makefile): vet command add .PHONY (#3915) (@imalasong)
  • 8ab47c694ea93fdb442b617961ce9b3171151749: ci(lint): update tooling and workflows for consistency (#3834) (@appleboy)
  • 8acbe657f1c140e3fba38f869978cab2376500c9: ci(release): refactor changelog regex patterns and exclusions (#3914) (@appleboy)
  • 000fdb3ac95c7c318440afbd98eaf60f7430a1db: ci(testing): add go1.22 version (#3842) (@appleboy)

Documentation updates

  • 990c44aebf20f0796d99051e53d6ee75b7ed52fb: docs(context): Added deprecation comments to BindWith (#3880) (@flc1125)
  • 861ffb9181dc811dc5d76fc450b36d3e68850b95: docs(middleware): comments to function BasicAuthForProxy (#3881) (@EndlessParadox1)
  • ee70b30a97205ac1f32889f41d8a494b3b2c81a5: docs: Add document to constant AuthProxyUserKey and BasicAuthForProxy. (#3887) (@EndlessParadox1)
  • f75144a356e57c95bd21a048f0a40492dcdb33c5: docs: fix typo in comment (#3868) (@testwill)
  • 83fc7673f9797b4c7d8d1c41b94e9922303e6275: docs: fix typo in function documentation (#3872) (@TotomiEcio)
  • 49f45a542719df661bd71dd48f1595f0bc1ff6f7: docs: remove redundant comments (#3765) (@WeiTheShinobi)
  • 75ccf94d605a05fe24817fc2f166f6f2959d5cea: feat: update version constant to v1.10.0 (#3952) (@appleboy)

Others

  • 02e754be9c4889f7ee56db0660cc611eb82b61d6: Upgrade golang.org/x/net -> v0.13.0 (#3684) (@cpcf)
  • 97eab7d09a8b048cab4a3d8ebd6c0ea78284c716: test(git): gitignore add develop tools (#3370) (@demoManito)
  • ae15646aba14cd8245fbebd263cc7740c6789ef3: test(http): use constant instead of numeric literal (#3863) (@testwill)
  • fd60a24ab76c3c92955ba253c1f7eda9e4981c3c: test(path): Optimize unit test execution results (#3883) (@flc1125)
  • bb2d8cf486bde2dc69bf05ea917095260ac13723: test(render): increased unit tests coverage (#3691) (@araujo88)

View on GitHub


v1.9.1: v1.9.1

Published: 2023-06-01

Changelog

BUG FIXES

  • fix Request.Context() checks #3512

SECURITY

  • fix lack of escaping of filename in Content-Disposition #3556

ENHANCEMENTS

  • refactor: use bytes.ReplaceAll directly #3455
  • convert strings and slices using the officially recommended way #3344
  • improve render code coverage #3525

DOCS

  • docs: changed documentation link for trusted proxies #3575
  • chore: improve linting, testing, and GitHub Actions setup #3583

View on GitHub


v1.9.0: v1.9.0

Published: 2023-02-21

Changelog

BREAK CHANGES

  • Stop useless panicking in context and render #2150

BUG FIXES

  • fix(router): tree bug where loop index is not decremented. #3460
  • fix(context): panic on NegotiateFormat - index out of range #3397
  • Add escape logic for header #3500 and #3503

SECURITY

  • Fix the GO-2022-0969 and GO-2022-0288 vulnerabilities #3333
  • fix(security): vulnerability GO-2023-1571 #3505

ENHANCEMENTS

  • feat: add sonic json support #3184
  • chore(file): Creates a directory named path #3316
  • fix: modify interface check way #3327
  • remove deprecated of package io/ioutil #3395
  • refactor: avoid calling strings.ToLower twice #3343
  • console logger HTTP status code bug fixed #3453
  • chore(yaml): upgrade dependency to v3 version #3456
  • chore(router): match method added to routergroup for multiple HTTP methods supporting #3464
  • chore(http): add support for go1.20 http.rwUnwrapper to gin.responseWriter #3489

DOCS

  • docs: update markdown format #3260
  • docs(readme): Add the TOML rendering example #3400
  • docs(readme): move more example to docs/doc.md #3449
  • docs: update markdown format #3446

View on GitHub


v1.8.2: v1.8.2

Published: 2022-12-22

Changelog

Bug fixes

  • 0c2a691 fix(engine): missing route params for CreateTestContext (#2778) (#2803)
  • e305e21 fix(route): redirectSlash bug (#3227)

Others

  • 6a2a260 Fix the GO-2022-1144 vulnerability (#3432)

View on GitHub


v1.8.1: v1.8.1

Published: 2022-06-06

Changelog

Features

  • f197a8b feat(context): add ContextWithFallback feature flag (#3166) (#3172)

View on GitHub


v1.8.0: v1.8.0

Published: 2022-05-30

Changelog

Break Changes

  • TrustedProxies: Add default IPv6 support and refactor #2967. Please replace RemoteIP() (net.IP, bool) with RemoteIP() net.IP
  • gin.Context with fallback value from gin.Context.Request.Context() #2751

BUGFIXES

  • Fixed SetOutput() panics on go 1.17 #2861
  • Fix: wrong when wildcard follows named param #2983
  • Fix: missing sameSite when do context.reset() #3123

ENHANCEMENTS

  • Use Header() instead of deprecated HeaderMap #2694
  • RouterGroup.Handle regular match optimization of http method #2685
  • Add support go-json, another drop-in json replacement #2680
  • Use errors.New to replace fmt.Errorf will much better #2707
  • Use Duration.Truncate for truncating precision #2711
  • Get client IP when using Cloudflare #2723
  • Optimize code adjust #2700
  • Optimize code and reduce code cyclomatic complexity #2737
  • gin.Context with fallback value from gin.Context.Request.Context() #2751
  • Improve sliceValidateError.Error performance #2765
  • Support custom struct tag #2720
  • Improve router group tests #2787
  • Fallback Context.Deadline() Context.Done() Context.Err() to Context.Request.Context() #2769
  • Some codes optimize #2830 #2834 #2838 #2837 #2788 #2848 #2851 #2701
  • Test(route): expose performRequest func #3012
  • Support h2c with prior knowledge #1398
  • Feat attachment filename support utf8 #3071
  • Feat: add StaticFileFS #2749
  • Feat(context): return GIN Context from Value method #2825
  • Feat: automatically SetMode to TestMode when run go test #3139
  • Add TOML bining for gin #3081
  • IPv6 add default trusted proxies #3033

DOCS

  • Add note about nomsgpack tag to the readme #2703

View on GitHub


v1.7.7: Release v1.7.7

Published: 2021-11-24

BUGFIXES

  • Fixed X-Forwarded-For unsafe handling of CVE-2020-28483 #2844, closed issue #2862
  • Tree: updated the code logic for latestNode #2897, closed issue #2894 #2878
  • Tree: fixed the misplacement of adding slashes #2847, closed issue #2843
  • Tree: fixed tsr with mixed static and wildcard paths #2924, closed issue #2918

ENHANCEMENTS

  • TrustedProxies: make it backward-compatible #2887, closed issue #2819
  • TrustedPlatform: provide custom options for another CDN services #2906

DOCS

  • NoMethod: added usage annotation (#2832)

View on GitHub


v1.7.6: Release v1.7.6

Published: 2021-11-23

Handle pre release v1.7.5 error, so release v1.7.6 but still use v1.7.4 codes.

View on GitHub


v1.7.4: bump new release to fix checksum mismatch

Published: 2021-08-15

View on GitHub


v1.7.3:

Published: 2021-08-03

BUGFIXES

View on GitHub


v1.7.2: release v1.7.2

Published: 2021-05-21

BUGFIXES

  • Fix conflict between param and exact path #2706. Close issue #2682 #2696.

View on GitHub


v1.7.1:

Published: 2021-04-08

BUGFIXES

  • fix: data race with trustedCIDRs from #2674(#2675)

View on GitHub


v1.7.0: Release v1.7.0

Published: 2021-04-08

BUGFIXES

  • fix compile error from #2572 (#2600)
  • fix: print headers without Authorization header on broken pipe (#2528)
  • fix(tree): reassign fullpath when register new node (#2366)

ENHANCEMENTS

  • Support params and exact routes without creating conflicts (#2663)
  • chore: improve render string performance (#2365)
  • Sync route tree to httprouter latest code (#2368)
  • chore: rename getQueryCache/getFormCache to initQueryCache/initFormCa (#2375)
  • chore(performance): improve countParams (#2378)
  • Remove some functions that have the same effect as the bytes package (#2387)
  • update:SetMode function (#2321)
  • remove a unused type SecureJSONPrefix (#2391)
  • Add a redirect sample for POST method (#2389)
  • Add CustomRecovery builtin middleware (#2322)
  • binding: avoid 2038 problem on 32-bit architectures (#2450)
  • Prevent panic in Context.GetQuery() when there is no Request (#2412)
  • Add GetUint and GetUint64 method on gin.context (#2487)
  • update content-disposition header to MIME-style (#2512)
  • reduce allocs and improve the render WriteString (#2508)
  • implement ".Unwrap() error" on Error type (#2525) (#2526)
  • Allow bind with a map[string]string (#2484)
  • chore: update tree (#2371)
  • Support binding for slice/array obj [Rewrite] (#2302)
  • basic auth: fix timing oracle (#2609)
  • Add mixed param and non-param paths (port of httprouter#329) (#2663)
  • feat(engine): add trustedproxies and remoteIP (#2632)

View on GitHub


v1.6.3: Improve performance

Published: 2020-05-03

ENHANCEMENTS

  • Improve performance: Change *sync.RWMutex to sync.RWMutex in context. #2351

View on GitHub


v1.6.2: release v1.6.2

Published: 2020-03-27

Release Notes

  • BUGFIXES
    • fix missing initial sync.RWMutex (#2305)
  • ENHANCEMENTS
    • Add set samesite in cookie. (#2306)

Contributors

View on GitHub


v1.6.1: release v1.6.1

Published: 2020-03-23

Release Notes

  • BUGFIXES
    • Revert "fix accept incoming network connections" (#2294) See the critical issue #2292

Contributors

View on GitHub


v1.6.0: release v1.6.0

Published: 2020-03-22

Release Notes

BREAKING

  • chore(performance): Improve performance for adding RemoveExtraSlash flag (#2159)
  • drop support govendor (#2148)
  • Added support for SameSite cookie flag (#1615)

FEATURES

  • add yaml negotitation (#2220)
  • FileFromFS (#2112)

BUGFIXES

  • Unix Socket Handling (#2280)
  • Use json marshall in context json to fix breaking new line issue. Fixes #2209 (#2228)
  • fix accept incoming network connections (#2216)
  • Fixed a bug in the calculation of the maximum number of parameters (#2166)
  • [FIX] allow empty headers on DataFromReader (#2121)
  • Add mutex for protect Context.Keys map (#1391)

ENHANCEMENTS

  • Add mitigation for log injection (#2277)
  • tree: range over nodes values (#2229)
  • tree: remove duplicate assignment (#2222)
  • chore: upgrade go-isatty and json-iterator/go (#2215)
  • path: sync code with httprouter (#2212)
  • Use zero-copy approach to convert types between string and byte slice (#2206)
  • Reuse bytes when cleaning the URL paths (#2179)
  • tree: remove one else statement (#2177)
  • tree: sync httprouter update (#2173) (#2172) (#2171)
  • tree: sync part httprouter codes and reduce if/else (#2163)
  • use http method constant (#2155)
  • upgrade go-validator to v10 (#2149)
  • Refactor redirect request in gin.go (#1970)
  • Add build tag nomsgpack (#1852)

DOCS

  • docs(path): improve comments (#2223)
  • Renew README to fit the modification of SetCookie method (#2217)
  • Fix spelling (#2202)
  • Remove broken link from README. (#2198)
  • Update docs on Context.Done(), Context.Deadline() and Context.Err() (#2196)
  • Update validator to v10 (#2190)
  • upgrade go-validator to v10 for README (#2189)
  • Update to currently output (#2188)
  • Fix "Custom Validators" example (#2186)
  • Add project to README (#2165)
  • docs(benchmarks): for gin v1.5 (#2153)
  • Changed wording for clarity in README.md (#2122)

MISC

  • ci support go1.14 (#2262)
  • chore: upgrade depend version (#2231)
  • Drop support go1.10 (#2147)
  • fix comment in mode.go (#2129)

Contributors

View on GitHub


v1.5.0:

Published: 2019-11-28

Feature

  • [NEW] Now you can parse the inline lowercase start structure #1893
  • [NEW] [Break-Backward] Hold matched route full path in the Context #1826
  • [NEW] Add context param query cache #1450
  • [NEW] Add support of multipart multi files #1949
  • [NEW] Support bind http header param #1957
  • [NEW] Support bind unix time #1980
  • [NEW] Support negative Content-Length in DataFromReader #1981
  • [NEW] Add DisallowUnknownFields() in gin.Context.BindJSON() #2028
  • [NEW] Use specific net.Listener with Engine.RunListener() #2023

Bug fix

  • [FIX] Use DefaultWriter and DefaultErrorWriter for debug messages #1891
  • [FIX] Some code improvements #1909
  • [FIX] Use encode replace json marshal increase json encoder speed #1546
  • [FIX] Fix context.Params race condition on Copy() #1841
  • [FIX] Improve GetQueryMap performance #1918
  • [FIX] Improve get post data #1920
  • [FIX] Use context instead of x/net/context #1922
  • [FIX] Attempt to fix PostForm cache bug #1931
  • [FIX] [Break-Backward] Drop support for go1.8 and go1.9 #1933
  • [FIX] Bugfix for the FullPath feature #1919
  • [FIX] Gin1.5 bytes.Buffer to strings.Builder #1939
  • [FIX] Upgrade github.com/ugorji/go/codec #1969
  • [FIX] Simplify code #2004
  • [FIX] Identify terminal on a RISC-V architecture for auto-colored logs #2019
  • [FIX] [Break-Backward] Context.JSONP() now expects a semicolon (;) at the end #2007
  • [FIX] [Break-Backward] Upgrade validator version to v9 #1015
  • [FIX] Fix some typo #2079 #2080
  • [FIX] Relocate binding body tests #2086
  • [FIX] Use Writer in Context.Status #1606
  • [FIX] Engine.RunUnix() now returns the error if it can't change the file mode #2093
  • [FIX] RouterGroup.StaticFS() leaked files. Now it closes them. #2118
  • [FIX] Context.Request.FormFile leaked file, now it closes it #2114
  • [FIX] Ignore walking on form:"-" mapping #1943
  • [REFACTOR] [Break-Backward] Use encode replace json marshal increase json encoder speed #1546

View on GitHub


v1.4.0:

Published: 2019-05-08

Feature

  • [NEW] Support for Go Modules #1569
  • [NEW] Refactor of form mapping multipart requesta #1829
  • [NEW] Supporting file binding #1264
  • [NEW] Add support for mapping arrays #1797
  • [NEW] Make context.Keys available as LogFormatterParams #1779
  • [NEW] Use internal/json for Marshal/Unmarshal #1791
  • [NEW] Support mapping time.Duration #1794
  • [NEW] Refactor form mappings #1749
  • [NEW] Added flag to context.Stream indicates if client disconnected in middle of stream #1252
  • [NEW] Extend context.File to allow for the content-dispositon attachments via a new method context.Attachment #1260
  • [NEW] Add prefix from X-Forwarded-Prefix in redirectTrailingSlash #1238
  • [NEW] Add context.HandlerNames() #1729
  • [NEW] Add response size to LogFormatterParams #1752
  • [NEW] Allow ignoring field on form mapping #1733
  • [NEW] Add a function to force color in console output. #1724
  • [NEW] Binding for URL Params #1694
  • [NEW] Add LoggerWithFormatter method #1677
  • [NEW] RunFd method to run http.Server through a file descriptor #1609
  • [NEW] Yaml binding support #1618
  • [NEW] Add PureJSON renderer #694
  • [NEW] Set default time format in form binding #1487
  • [NEW] Upgrade dependency libraries #1491

Bug fix

  • [FIX] Truncate Latency precision in long running request #1830
  • [FIX] IsTerm flag should not be affected by DisableConsoleColor method. #1802
  • [FIX] Readme updates #1793 #1788 1789
  • [FIX] StaticFS: Fixed Logging two log lines on 404. #1805, #1804
  • [FIX] Moved examples to stand alone Repo #1775
  • [FIX] Support HTTP content negotiation wildcards #1112
  • [FIX] Pass MaxMultipartMemory when FormFile is called #1600
  • [FIX] LoadHTML* tests #1559
  • [FIX] Removed use of sync.pool from HandleContext #1565
  • [FIX] Format output log to os.Stderr #1571
  • [FIX] Make logger use a yellow background and a darkgray text for legibility #1570
  • [FIX] Remove sensitive request information from panic log. #1370
  • [FIX] log.Println() does not print timestamp #829 #1560
  • [FIX] Add missing copyright and update if/else #1497
  • [FIX] Update msgpack usage #1498
  • [FIX] Use protobuf on render #1496
  • [FIX] Add support for Protobuf format response #1479
  • [FIX] Add BindXML and ShouldBindXML #1485
  • [FIX] CI testing updates #1671 #1670 #1682 #1669
  • [FIX] StaticFS(): Send 404 when path does not exist #1663
  • [FIX] Handle nil body for JSON binding #1638
  • [FIX] Support bind uri param #1612
  • [FIX] recovery: fix issue with syscall import on google app engine #1640
  • [FIX] Make sure the debug log contains line breaks #1650
  • [FIX] Panic stack trace being printed during recovery of broken pipe #1089 #1259
  • [FIX] Context.Next() - recheck len of handlers on every iteration. #1745
  • [FIX] Fix all errcheck warnings #1739 #1653
  • [FIX] Change color methods to public in the defaultLogger. #1771
  • [FIX] Update writeHeaders method to use http.Header.Set #1722
  • [FIX] context.Copy() race condition #1020

View on GitHub


v1.3.0: v1.3.0

Published: 2018-08-14

CHANGELOG

Gin 1.3.0

View on GitHub


v1.2: v1.2

Published: 2017-07-02

  • [NEW] Switch from godeps to govendor
  • [NEW] Add support for Let's Encrypt via gin-gonic/autotls
  • [NEW] Improve README examples and add extra at examples folder
  • [NEW] Improved support with App Engine
  • [NEW] Add custom template delimiters, see #860
  • [NEW] Add Template Func Maps, see #962
  • [NEW] Add *context.Handler(), see #928
  • [NEW] Add *context.GetRawData()
  • [NEW] Add *context.GetHeader() (request)
  • [NEW] Add *context.AbortWithStatusJSON() (JSON content type)
  • [NEW] Add *context.Keys type cast helpers
  • [NEW] Add *context.ShouldBindWith()
  • [NEW] Add *context.MustBindWith()
  • [NEW] Add *engine.SetFuncMap()
  • [DEPRECATE] On next release: *context.BindWith(), see #855
  • [FIX] Refactor render
  • [FIX] Reworked tests
  • [FIX] logger now supports cygwin
  • [FIX] Use X-Forwarded-For before X-Real-Ip
  • [FIX] time.Time binding (#904)

View on GitHub


v1.1.4: Release v1.1.4

Published: 2016-12-05

View on GitHub


v1.1.3: Release v1.1.3

Published: 2016-12-04

View on GitHub


v1.1: v1.1

Published: 2016-12-03

v1.1 (#751)

  • Implement QueryArray and PostArray methods
  • Refactor GetQuery and GetPostForm
  • Removed additional Iota

I think assigning iota to each constant is not required

  • Add 1.7 test.
  • Add codecov.io
  • corrected a typo in README
  • remove coveralls services.

Signed-off-by: Bo-Yi Wu appleboy.tw@gmail.com

  • Update TravisCI to Gitter webhook
  • Add codecov.yml Gitter webhook
  • Changed imports to gopkg instead of github in README (#733)
  • Add contribution guide
  • Update go get for stable version

In the future, github default branch will be develop so running go get github.com/gin-gonic/gin will pull latest code from develop.

  • Changed imports to gopkg instead of github in README
  • Update README.md
  • Logger: skip ANSI color commands if output is not a tty

Special note: 👏 Thanks to @appleboy and @tboerger for their awesome work managing PRs and issues for this version. This just only started 😉

View on GitHub


v1.0-rc.2: v1.0-rc.2

Published: 2016-10-12

  • This tag / release points to the latest commit as of today in develop.
  • Added a new maintainer to the organization @appleboy

(Expect a final v1.0 very soon, for now you can use this release as the latest stable work available)

View on GitHub


v1.0rc1:

Published: 2015-05-22

  • [PERFORMANCE] Zero allocation router
  • [PERFORMANCE] Faster JSON, XML and text rendering
  • [PERFORMANCE] Custom hand optimized HttpRouter for Gin
  • [PERFORMANCE] Misc code optimizations. Inlining, tail call optimizations
  • [NEW] Built-in support for golang.org/x/net/context
  • [NEW] Any(path, handler). Create a route that matches any path
  • [NEW] Refactored rendering pipeline (faster and static typeded)
  • [NEW] Refactored errors API
  • [NEW] IndentedJSON() prints pretty JSON
  • [NEW] Added gin.DefaultWriter
  • [NEW] UNIX socket support
  • [NEW] RouterGroup.BasePath is exposed
  • [NEW] JSON validation using go-validate-yourself (very powerful options)
  • [NEW] Completed suite of unit tests
  • [NEW] HTTP streaming with c.Stream()
  • [NEW] StaticFile() creates a router for serving just one file.
  • [NEW] StaticFS() has an option to disable directory listing.
  • [NEW] StaticFS() for serving static files through virtual filesystems
  • [NEW] Server-Sent Events native support
  • [NEW] WrapF() and WrapH() helpers for wrapping http.HandlerFunc and http.Handler
  • [NEW] Added LoggerWithWriter() middleware
  • [NEW] Added RecoveryWithWriter() middleware
  • [NEW] Added DefaultPostFormValue()
  • [NEW] Added DefaultFormValue()
  • [NEW] Added DefaultParamValue()
  • [FIX] BasicAuth() when using custom realm
  • [FIX] Bug when serving static files in nested routing group
  • [FIX] Redirect using built-in http.Redirect()
  • [FIX] Logger when printing the requested path
  • [FIX] Documentation typos
  • [FIX] Context.Engine renamed to Context.engine
  • [FIX] Better debugging messages
  • [FIX] ErrorLogger
  • [FIX] Debug HTTP render
  • [FIX] Refactored binding and render modules
  • [FIX] Refactored Context initialization
  • [FIX] Refactored BasicAuth()
  • [FIX] NoMethod/NoRoute handlers
  • [FIX] Hijacking http
  • [FIX] Better support for Google App Engine (using log instead of fmt)

View on GitHub