commit 5985f8f720728302157ed761272bf81b0250ca7a Author: Zhongwei Li Date: Sat Nov 29 17:59:34 2025 +0800 Initial commit diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..2fc24a5 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,12 @@ +{ + "name": "go-gin-skills", + "description": "A comprehensive skill for the Go Gin web framework including routing, middleware, binding, and testing", + "version": "1.0.0", + "author": { + "name": "bailu", + "email": "bailu092213@gmail.com" + }, + "skills": [ + "./" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..95b9b85 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# go-gin-skills + +A comprehensive skill for the Go Gin web framework including routing, middleware, binding, and testing diff --git a/SKILL.md b/SKILL.md new file mode 100644 index 0000000..f10fdf8 --- /dev/null +++ b/SKILL.md @@ -0,0 +1,59 @@ +--- +name: gin +description: A comprehensive skill for the Go Gin web framework including routing, middleware, binding, and testing +--- + +# gin + +A comprehensive skill for the Go Gin web framework including routing, middleware, binding, and testing + +## Description + +Gin is a high-performance HTTP web framework written in Go. It provides a Martini-like API but with significantly better performanceโ€”up to 40 times fasterโ€”thanks to httprouter. Gin is designed for building REST APIs, web applications, and microservices. + +**Repository:** [gin-gonic/gin](https://github.com/gin-gonic/gin) +**Language:** Go +**Stars:** 86,855 +**License:** MIT License + +## When to Use This Skill + +Use this skill when you need to: +- Understand how to use gin +- Look up API documentation +- Find usage examples +- Check for known issues or recent changes +- Review release history + +## Quick Reference + +### Repository Info +- **Homepage:** https://gin-gonic.com/ +- **Topics:** server, middleware, framework, go, router, performance, gin +- **Open Issues:** 872 +- **Last Updated:** 2025-11-07 + +### Languages +- **Go:** 99.5% +- **Makefile:** 0.5% + +### Recent Releases +- **v1.11.0** (2025-09-20): v1.11.0 +- **v1.10.1** (2025-05-20): v1.10.1 +- **v1.10.0** (2024-05-07): v1.10.0 + +## Available References + +- `references/README.md` - Complete README documentation +- `references/CHANGELOG.md` - Version history and changes +- `references/issues.md` - Recent GitHub issues +- `references/releases.md` - Release notes +- `references/file_structure.md` - Repository structure + +## Usage + +See README.md for complete usage instructions and examples. + +--- + +**Generated by Skill Seeker** | GitHub Repository Scraper diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..188107b --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,73 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:bailu2025/CC-Plugins:plugins/go-gin-skills", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "de2d8b093e464793b2535d399287f86fb69acb89", + "treeHash": "d8ea8921c4cf29f7bc33e0739ce9acfd65c12d6194cebca44d5dfed80729960c", + "generatedAt": "2025-11-28T10:14:06.277327Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "go-gin-skills", + "description": "A comprehensive skill for the Go Gin web framework including routing, middleware, binding, and testing", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "f923bc83876fede76c37c842c2aec7cd27b60aa4931e3a900951898218ea97a0" + }, + { + "path": "SKILL.md", + "sha256": "6be31c3978ae1aa7a0631dab5c7af9cf07db11151fc947d7cca1d362d3a0e4d6" + }, + { + "path": "references/file_structure.md", + "sha256": "f186feec84291c913f89f1c3daafb4fa10f5f11064d6c48c8480b0f31f3ec74f" + }, + { + "path": "references/releases.md", + "sha256": "f6025c29a8341c20268e1e32b4516ed938633f09546f6612e191387fcdfafc7b" + }, + { + "path": "references/CHANGELOG.md", + "sha256": "8a7858278e2b837a1c786f325987f8b4854c88dd198cd587e2bb001185629930" + }, + { + "path": "references/README.md", + "sha256": "97e15593b9be0b462367b10874f0a7b4b2297bfd73518f9554dbfca86d8f3adf" + }, + { + "path": "references/index.md", + "sha256": "217c669a09fea0019f310d063ed4dac0fb0afb0f45f1b708bde75b696060d5b3" + }, + { + "path": "references/issues.md", + "sha256": "5b9dd8602e71ca2060df9ee09d7f662782fc6576504a58a2a7c2a6c3398be2ce" + }, + { + "path": "references/other.md", + "sha256": "29ba96ab94bb3f1e90b1555a18c9019fa982891266c5ccc520084418c5af6274" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "f621907011268f6a57bad4c68502f52d38608e0f1b3ff41b4a352577a370c3d5" + } + ], + "dirSha256": "d8ea8921c4cf29f7bc33e0739ce9acfd65c12d6194cebca44d5dfed80729960c" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file diff --git a/references/CHANGELOG.md b/references/CHANGELOG.md new file mode 100644 index 0000000..9451db3 --- /dev/null +++ b/references/CHANGELOG.md @@ -0,0 +1,753 @@ +# Gin ChangeLog + +## Gin v1.11.0 + +### Features + +* feat(gin): Experimental support for HTTP/3 using quic-go/quic-go ([#3210](https://github.com/gin-gonic/gin/pull/3210)) +* feat(form): add array collection format in form binding ([#3986](https://github.com/gin-gonic/gin/pull/3986)), add custom string slice for form tag unmarshal ([#3970](https://github.com/gin-gonic/gin/pull/3970)) +* feat(binding): add BindPlain ([#3904](https://github.com/gin-gonic/gin/pull/3904)) +* feat(fs): Export, test and document OnlyFilesFS ([#3939](https://github.com/gin-gonic/gin/pull/3939)) +* feat(binding): add support for unixMilli and unixMicro ([#4190](https://github.com/gin-gonic/gin/pull/4190)) +* feat(form): Support default values for collections in form binding ([#4048](https://github.com/gin-gonic/gin/pull/4048)) +* feat(context): GetXxx added support for more go native types ([#3633](https://github.com/gin-gonic/gin/pull/3633)) + +### Enhancements + +* perf(context): optimize getMapFromFormData performance ([#4339](https://github.com/gin-gonic/gin/pull/4339)) +* refactor(tree): replace string(/) with "/" in node.insertChild ([#4354](https://github.com/gin-gonic/gin/pull/4354)) +* refactor(render): remove headers parameter from writeHeader ([#4353](https://github.com/gin-gonic/gin/pull/4353)) +* refactor(context): simplify "GetType()" functions ([#4080](https://github.com/gin-gonic/gin/pull/4080)) +* refactor(slice): simplify SliceValidationError Error method ([#3910](https://github.com/gin-gonic/gin/pull/3910)) +* refactor(context):Avoid using filepath.Dir twice in SaveUploadedFile ([#4181](https://github.com/gin-gonic/gin/pull/4181)) +* refactor(context): refactor context handling and improve test robustness ([#4066](https://github.com/gin-gonic/gin/pull/4066)) +* refactor(binding): use strings.Cut to replace strings.Index ([#3522](https://github.com/gin-gonic/gin/pull/3522)) +* refactor(context): add an optional permission parameter to SaveUploadedFile ([#4068](https://github.com/gin-gonic/gin/pull/4068)) +* refactor(context): verify URL is Non-nil in initQueryCache() ([#3969](https://github.com/gin-gonic/gin/pull/3969)) +* refactor(context): YAML judgment logic in Negotiate ([#3966](https://github.com/gin-gonic/gin/pull/3966)) +* tree: replace the self-defined 'min' to official one ([#3975](https://github.com/gin-gonic/gin/pull/3975)) +* context: Remove redundant filepath.Dir usage ([#4181](https://github.com/gin-gonic/gin/pull/4181)) + +### Bug Fixes + +* fix: prevent middleware re-entry issue in HandleContext ([#3987](https://github.com/gin-gonic/gin/pull/3987)) +* fix(binding): prevent duplicate decoding and add validation in decodeToml ([#4193](https://github.com/gin-gonic/gin/pull/4193)) +* fix(gin): Do not panic when handling method not allowed on empty tree ([#4003](https://github.com/gin-gonic/gin/pull/4003)) +* fix(gin): data race warning for gin mode ([#1580](https://github.com/gin-gonic/gin/pull/1580)) +* fix(context): verify URL is Non-nil in initQueryCache() ([#3969](https://github.com/gin-gonic/gin/pull/3969)) +* fix(context): YAML judgment logic in Negotiate ([#3966](https://github.com/gin-gonic/gin/pull/3966)) +* fix(context): check handler is nil ([#3413](https://github.com/gin-gonic/gin/pull/3413)) +* fix(readme): fix broken link to English documentation ([#4222](https://github.com/gin-gonic/gin/pull/4222)) +* fix(tree): Keep panic infos consistent when wildcard type build faild ([#4077](https://github.com/gin-gonic/gin/pull/4077)) + +### Build process updates / CI + +* ci: integrate Trivy vulnerability scanning into CI workflow ([#4359](https://github.com/gin-gonic/gin/pull/4359)) +* ci: support Go 1.25 in CI/CD ([#4341](https://github.com/gin-gonic/gin/pull/4341)) +* build(deps): upgrade github.com/bytedance/sonic from v1.13.2 to v1.14.0 ([#4342](https://github.com/gin-gonic/gin/pull/4342)) +* ci: add Go version 1.24 to GitHub Actions ([#4154](https://github.com/gin-gonic/gin/pull/4154)) +* build: update Gin minimum Go version to 1.21 ([#3960](https://github.com/gin-gonic/gin/pull/3960)) +* ci(lint): enable new linters (testifylint, usestdlibvars, perfsprint, etc.) ([#4010](https://github.com/gin-gonic/gin/pull/4010), [#4091](https://github.com/gin-gonic/gin/pull/4091), [#4090](https://github.com/gin-gonic/gin/pull/4090)) +* ci(lint): update workflows and improve test request consistency ([#4126](https://github.com/gin-gonic/gin/pull/4126)) + +### Dependency updates + +* chore(deps): bump google.golang.org/protobuf from 1.36.6 to 1.36.9 ([#4346](https://github.com/gin-gonic/gin/pull/4346), [#4356](https://github.com/gin-gonic/gin/pull/4356)) +* chore(deps): bump github.com/stretchr/testify from 1.10.0 to 1.11.1 ([#4347](https://github.com/gin-gonic/gin/pull/4347)) +* chore(deps): bump actions/setup-go from 5 to 6 ([#4351](https://github.com/gin-gonic/gin/pull/4351)) +* chore(deps): bump github.com/quic-go/quic-go from 0.53.0 to 0.54.0 ([#4328](https://github.com/gin-gonic/gin/pull/4328)) +* chore(deps): bump golang.org/x/net from 0.33.0 to 0.38.0 ([#4178](https://github.com/gin-gonic/gin/pull/4178), [#4221](https://github.com/gin-gonic/gin/pull/4221)) +* chore(deps): bump github.com/go-playground/validator/v10 from 10.20.0 to 10.22.1 ([#4052](https://github.com/gin-gonic/gin/pull/4052)) + +### Documentation updates + +* docs(changelog): update release notes for Gin v1.10.1 ([#4360](https://github.com/gin-gonic/gin/pull/4360)) +* docs: Fixing English grammar mistakes and awkward sentence structure in doc/doc.md ([#4207](https://github.com/gin-gonic/gin/pull/4207)) +* docs: update documentation and release notes for Gin v1.10.0 ([#3953](https://github.com/gin-gonic/gin/pull/3953)) +* docs: fix typo in Gin Quick Start ([#3997](https://github.com/gin-gonic/gin/pull/3997)) +* docs: fix comment and link issues ([#4205](https://github.com/gin-gonic/gin/pull/4205), [#3938](https://github.com/gin-gonic/gin/pull/3938)) +* docs: fix route group example code ([#4020](https://github.com/gin-gonic/gin/pull/4020)) +* docs(readme): add Portuguese documentation ([#4078](https://github.com/gin-gonic/gin/pull/4078)) +* docs(context): fix some function names in comment ([#4079](https://github.com/gin-gonic/gin/pull/4079)) + +--- + +## Gin v1.10.1 + +### Features + +* refactor: strengthen HTTPS security and improve code organization +* feat(binding): Support custom BindUnmarshaler for binding. (#3933) + +### Enhancements + +* chore(deps): bump github.com/bytedance/sonic from 1.11.3 to 1.11.6 (#3940) +* chore(deps): bump golangci/golangci-lint-action from 4 to 5 (#3941) +* chore: update external dependencies to latest versions (#3950) +* chore: update various Go dependencies to latest versions (#3901) +* chore: refactor configuration files for better readability (#3951) +* chore: update changelog categories and improve documentation (#3917) +* feat: update version constant to v1.10.0 (#3952) + +### Build process updates + +* ci(release): refactor changelog regex patterns and exclusions (#3914) +* ci(Makefile): vet command add .PHONY (#3915) + +## Gin v1.10.0 + +### Features + +* feat(auth): add proxy-server authentication (#3877) (@EndlessParadox1) +* feat(bind): ShouldBindBodyWith shortcut and change doc (#3871) (@RedCrazyGhost) +* feat(binding): Support custom BindUnmarshaler for binding. (#3933) (@dkkb) +* feat(binding): support override default binding implement (#3514) (@ssfyn) +* feat(engine): Added `OptionFunc` and `With` (#3572) (@flc1125) +* feat(logger): ability to skip logs based on user-defined logic (#3593) (@palvaneh) + +### Bug fixes + +* Revert "fix(uri): query binding bug (#3236)" (#3899) (@appleboy) +* fix(binding): binding error while not upload file (#3819) (#3820) (@clearcodecn) +* fix(binding): dereference pointer to struct (#3199) (@echovl) +* fix(context): make context Value method adhere to Go standards (#3897) (@FarmerChillax) +* fix(engine): fix unit test (#3878) (@flc1125) +* fix(header): Allow header according to RFC 7231 (HTTP 405) (#3759) (@Crocmagnon) +* fix(route): Add fullPath in context copy (#3784) (@KarthikReddyPuli) +* fix(router): catch-all conflicting wildcard (#3812) (@FirePing32) +* fix(sec): upgrade golang.org/x/crypto to 0.17.0 (#3832) (@chncaption) +* fix(tree): correctly expand the capacity of params (#3502) (@georgijd-form3) +* fix(uri): query binding bug (#3236) (@illiafox) +* fix: Add pointer support for url query params (#3659) (#3666) (@omkar-foss) +* fix: protect Context.Keys map when call Copy method (#3873) (@kingcanfish) + +### Enhancements + +* chore(CI): update release args (#3595) (@qloog) +* chore(IP): add TrustedPlatform constant for Fly.io. (#3839) (@ab) +* chore(debug): add ability to override the debugPrint statement (#2337) (@josegonzalez) +* chore(deps): update dependencies to latest versions (#3835) (@appleboy) +* chore(header): Add support for RFC 9512: application/yaml (#3851) (@vincentbernat) +* chore(http): use white color for HTTP 1XX (#3741) (@viralparmarme) +* chore(optimize): the ShouldBindUri method of the Context struct (#3911) (@1911860538) +* chore(perf): Optimize the Copy method of the Context struct (#3859) (@1911860538) +* chore(refactor): modify interface check way (#3855) (@demoManito) +* chore(request): check reader if it's nil before reading (#3419) (@noahyao1024) +* chore(security): upgrade Protobuf for CVE-2024-24786 (#3893) (@Fotkurz) +* chore: refactor CI and update dependencies (#3848) (@appleboy) +* chore: refactor configuration files for better readability (#3951) (@appleboy) +* chore: update GitHub Actions configuration (#3792) (@appleboy) +* chore: update changelog categories and improve documentation (#3917) (@appleboy) +* chore: update dependencies to latest versions (#3694) (@appleboy) +* chore: update external dependencies to latest versions (#3950) (@appleboy) +* chore: update various Go dependencies to latest versions (#3901) (@appleboy) + +### Build process updates + +* build(codecov): Added a codecov configuration (#3891) (@flc1125) +* ci(Makefile): vet command add .PHONY (#3915) (@imalasong) +* ci(lint): update tooling and workflows for consistency (#3834) (@appleboy) +* ci(release): refactor changelog regex patterns and exclusions (#3914) (@appleboy) +* ci(testing): add go1.22 version (#3842) (@appleboy) + +### Documentation updates + +* docs(context): Added deprecation comments to BindWith (#3880) (@flc1125) +* docs(middleware): comments to function `BasicAuthForProxy` (#3881) (@EndlessParadox1) +* docs: Add document to constant `AuthProxyUserKey` and `BasicAuthForProxy`. (#3887) (@EndlessParadox1) +* docs: fix typo in comment (#3868) (@testwill) +* docs: fix typo in function documentation (#3872) (@TotomiEcio) +* docs: remove redundant comments (#3765) (@WeiTheShinobi) +* feat: update version constant to v1.10.0 (#3952) (@appleboy) + +### Others + +* Upgrade golang.org/x/net -> v0.13.0 (#3684) (@cpcf) +* test(git): gitignore add develop tools (#3370) (@demoManito) +* test(http): use constant instead of numeric literal (#3863) (@testwill) +* test(path): Optimize unit test execution results (#3883) (@flc1125) +* test(render): increased unit tests coverage (#3691) (@araujo88) + +## Gin v1.9.1 + +### BUG FIXES + +* fix Request.Context() checks [#3512](https://github.com/gin-gonic/gin/pull/3512) + +### SECURITY + +* fix lack of escaping of filename in Content-Disposition [#3556](https://github.com/gin-gonic/gin/pull/3556) + +### ENHANCEMENTS + +* refactor: use bytes.ReplaceAll directly [#3455](https://github.com/gin-gonic/gin/pull/3455) +* convert strings and slices using the officially recommended way [#3344](https://github.com/gin-gonic/gin/pull/3344) +* improve render code coverage [#3525](https://github.com/gin-gonic/gin/pull/3525) + +### DOCS + +* docs: changed documentation link for trusted proxies [#3575](https://github.com/gin-gonic/gin/pull/3575) +* chore: improve linting, testing, and GitHub Actions setup [#3583](https://github.com/gin-gonic/gin/pull/3583) + +## Gin v1.9.0 + +### BREAK CHANGES + +* Stop useless panicking in context and render [#2150](https://github.com/gin-gonic/gin/pull/2150) + +### BUG FIXES + +* fix(router): tree bug where loop index is not decremented. [#3460](https://github.com/gin-gonic/gin/pull/3460) +* fix(context): panic on NegotiateFormat - index out of range [#3397](https://github.com/gin-gonic/gin/pull/3397) +* Add escape logic for header [#3500](https://github.com/gin-gonic/gin/pull/3500) and [#3503](https://github.com/gin-gonic/gin/pull/3503) + +### SECURITY + +* Fix the GO-2022-0969 and GO-2022-0288 vulnerabilities [#3333](https://github.com/gin-gonic/gin/pull/3333) +* fix(security): vulnerability GO-2023-1571 [#3505](https://github.com/gin-gonic/gin/pull/3505) + +### ENHANCEMENTS + +* feat: add sonic json support [#3184](https://github.com/gin-gonic/gin/pull/3184) +* chore(file): Creates a directory named path [#3316](https://github.com/gin-gonic/gin/pull/3316) +* fix: modify interface check way [#3327](https://github.com/gin-gonic/gin/pull/3327) +* remove deprecated of package io/ioutil [#3395](https://github.com/gin-gonic/gin/pull/3395) +* refactor: avoid calling strings.ToLower twice [#3343](https://github.com/gin-gonic/gin/pull/3433) +* console logger HTTP status code bug fixed [#3453](https://github.com/gin-gonic/gin/pull/3453) +* chore(yaml): upgrade dependency to v3 version [#3456](https://github.com/gin-gonic/gin/pull/3456) +* chore(router): match method added to routergroup for multiple HTTP methods supporting [#3464](https://github.com/gin-gonic/gin/pull/3464) +* chore(http): add support for go1.20 http.rwUnwrapper to gin.responseWriter [#3489](https://github.com/gin-gonic/gin/pull/3489) + +### DOCS + +* docs: update markdown format [#3260](https://github.com/gin-gonic/gin/pull/3260) +* docs(readme): Add the TOML rendering example [#3400](https://github.com/gin-gonic/gin/pull/3400) +* docs(readme): move more example to docs/doc.md [#3449](https://github.com/gin-gonic/gin/pull/3449) +* docs: update markdown format [#3446](https://github.com/gin-gonic/gin/pull/3446) + +## Gin v1.8.2 + +### BUG FIXES + +* fix(route): redirectSlash bug ([#3227]((https://github.com/gin-gonic/gin/pull/3227))) +* fix(engine): missing route params for CreateTestContext ([#2778]((https://github.com/gin-gonic/gin/pull/2778))) ([#2803]((https://github.com/gin-gonic/gin/pull/2803))) + +### SECURITY + +* Fix the GO-2022-1144 vulnerability ([#3432]((https://github.com/gin-gonic/gin/pull/3432))) + +## Gin v1.8.1 + +### ENHANCEMENTS + +* feat(context): add ContextWithFallback feature flag [#3172](https://github.com/gin-gonic/gin/pull/3172) + +## Gin v1.8.0 + +### BREAK CHANGES + +* TrustedProxies: Add default IPv6 support and refactor [#2967](https://github.com/gin-gonic/gin/pull/2967). Please replace `RemoteIP() (net.IP, bool)` with `RemoteIP() net.IP` +* gin.Context with fallback value from gin.Context.Request.Context() [#2751](https://github.com/gin-gonic/gin/pull/2751) + +### BUG FIXES + +* Fixed SetOutput() panics on go 1.17 [#2861](https://github.com/gin-gonic/gin/pull/2861) +* Fix: wrong when wildcard follows named param [#2983](https://github.com/gin-gonic/gin/pull/2983) +* Fix: missing sameSite when do context.reset() [#3123](https://github.com/gin-gonic/gin/pull/3123) + +### ENHANCEMENTS + +* Use Header() instead of deprecated HeaderMap [#2694](https://github.com/gin-gonic/gin/pull/2694) +* RouterGroup.Handle regular match optimization of http method [#2685](https://github.com/gin-gonic/gin/pull/2685) +* Add support go-json, another drop-in json replacement [#2680](https://github.com/gin-gonic/gin/pull/2680) +* Use errors.New to replace fmt.Errorf will much better [#2707](https://github.com/gin-gonic/gin/pull/2707) +* Use Duration.Truncate for truncating precision [#2711](https://github.com/gin-gonic/gin/pull/2711) +* Get client IP when using Cloudflare [#2723](https://github.com/gin-gonic/gin/pull/2723) +* Optimize code adjust [#2700](https://github.com/gin-gonic/gin/pull/2700/files) +* Optimize code and reduce code cyclomatic complexity [#2737](https://github.com/gin-gonic/gin/pull/2737) +* Improve sliceValidateError.Error performance [#2765](https://github.com/gin-gonic/gin/pull/2765) +* Support custom struct tag [#2720](https://github.com/gin-gonic/gin/pull/2720) +* Improve router group tests [#2787](https://github.com/gin-gonic/gin/pull/2787) +* Fallback Context.Deadline() Context.Done() Context.Err() to Context.Request.Context() [#2769](https://github.com/gin-gonic/gin/pull/2769) +* Some codes optimize [#2830](https://github.com/gin-gonic/gin/pull/2830) [#2834](https://github.com/gin-gonic/gin/pull/2834) [#2838](https://github.com/gin-gonic/gin/pull/2838) [#2837](https://github.com/gin-gonic/gin/pull/2837) [#2788](https://github.com/gin-gonic/gin/pull/2788) [#2848](https://github.com/gin-gonic/gin/pull/2848) [#2851](https://github.com/gin-gonic/gin/pull/2851) [#2701](https://github.com/gin-gonic/gin/pull/2701) +* TrustedProxies: Add default IPv6 support and refactor [#2967](https://github.com/gin-gonic/gin/pull/2967) +* Test(route): expose performRequest func [#3012](https://github.com/gin-gonic/gin/pull/3012) +* Support h2c with prior knowledge [#1398](https://github.com/gin-gonic/gin/pull/1398) +* Feat attachment filename support utf8 [#3071](https://github.com/gin-gonic/gin/pull/3071) +* Feat: add StaticFileFS [#2749](https://github.com/gin-gonic/gin/pull/2749) +* Feat(context): return GIN Context from Value method [#2825](https://github.com/gin-gonic/gin/pull/2825) +* Feat: automatically SetMode to TestMode when run go test [#3139](https://github.com/gin-gonic/gin/pull/3139) +* Add TOML bining for gin [#3081](https://github.com/gin-gonic/gin/pull/3081) +* IPv6 add default trusted proxies [#3033](https://github.com/gin-gonic/gin/pull/3033) + +### DOCS + +* Add note about nomsgpack tag to the readme [#2703](https://github.com/gin-gonic/gin/pull/2703) + +## Gin v1.7.7 + +### BUG FIXES + +* Fixed X-Forwarded-For unsafe handling of CVE-2020-28483 [#2844](https://github.com/gin-gonic/gin/pull/2844), closed issue [#2862](https://github.com/gin-gonic/gin/issues/2862). +* Tree: updated the code logic for `latestNode` [#2897](https://github.com/gin-gonic/gin/pull/2897), closed issue [#2894](https://github.com/gin-gonic/gin/issues/2894) [#2878](https://github.com/gin-gonic/gin/issues/2878). +* Tree: fixed the misplacement of adding slashes [#2847](https://github.com/gin-gonic/gin/pull/2847), closed issue [#2843](https://github.com/gin-gonic/gin/issues/2843). +* Tree: fixed tsr with mixed static and wildcard paths [#2924](https://github.com/gin-gonic/gin/pull/2924), closed issue [#2918](https://github.com/gin-gonic/gin/issues/2918). + +### ENHANCEMENTS + +* TrustedProxies: make it backward-compatible [#2887](https://github.com/gin-gonic/gin/pull/2887), closed issue [#2819](https://github.com/gin-gonic/gin/issues/2819). +* TrustedPlatform: provide custom options for another CDN services [#2906](https://github.com/gin-gonic/gin/pull/2906). + +### DOCS + +* NoMethod: added usage annotation ([#2832](https://github.com/gin-gonic/gin/pull/2832#issuecomment-929954463)). + +## Gin v1.7.6 + +### BUG FIXES + +* bump new release to fix v1.7.5 release error by using v1.7.4 codes. + +## Gin v1.7.4 + +### BUG FIXES + +* bump new release to fix checksum mismatch + +## Gin v1.7.3 + +### BUG FIXES + +* fix level 1 router match [#2767](https://github.com/gin-gonic/gin/issues/2767), [#2796](https://github.com/gin-gonic/gin/issues/2796) + +## Gin v1.7.2 + +### BUG FIXES + +* Fix conflict between param and exact path [#2706](https://github.com/gin-gonic/gin/issues/2706). Close issue [#2682](https://github.com/gin-gonic/gin/issues/2682) [#2696](https://github.com/gin-gonic/gin/issues/2696). + +## Gin v1.7.1 + +### BUG FIXES + +* fix: data race with trustedCIDRs from [#2674](https://github.com/gin-gonic/gin/issues/2674)([#2675](https://github.com/gin-gonic/gin/pull/2675)) + +## Gin v1.7.0 + +### BUG FIXES + +* fix compile error from [#2572](https://github.com/gin-gonic/gin/pull/2572) ([#2600](https://github.com/gin-gonic/gin/pull/2600)) +* fix: print headers without Authorization header on broken pipe ([#2528](https://github.com/gin-gonic/gin/pull/2528)) +* fix(tree): reassign fullpath when register new node ([#2366](https://github.com/gin-gonic/gin/pull/2366)) + +### ENHANCEMENTS + +* Support params and exact routes without creating conflicts ([#2663](https://github.com/gin-gonic/gin/pull/2663)) +* chore: improve render string performance ([#2365](https://github.com/gin-gonic/gin/pull/2365)) +* Sync route tree to httprouter latest code ([#2368](https://github.com/gin-gonic/gin/pull/2368)) +* chore: rename getQueryCache/getFormCache to initQueryCache/initFormCa ([#2375](https://github.com/gin-gonic/gin/pull/2375)) +* chore(performance): improve countParams ([#2378](https://github.com/gin-gonic/gin/pull/2378)) +* Remove some functions that have the same effect as the bytes package ([#2387](https://github.com/gin-gonic/gin/pull/2387)) +* update:SetMode function ([#2321](https://github.com/gin-gonic/gin/pull/2321)) +* remove an unused type SecureJSONPrefix ([#2391](https://github.com/gin-gonic/gin/pull/2391)) +* Add a redirect sample for POST method ([#2389](https://github.com/gin-gonic/gin/pull/2389)) +* Add CustomRecovery builtin middleware ([#2322](https://github.com/gin-gonic/gin/pull/2322)) +* binding: avoid 2038 problem on 32-bit architectures ([#2450](https://github.com/gin-gonic/gin/pull/2450)) +* Prevent panic in Context.GetQuery() when there is no Request ([#2412](https://github.com/gin-gonic/gin/pull/2412)) +* Add GetUint and GetUint64 method on gin.context ([#2487](https://github.com/gin-gonic/gin/pull/2487)) +* update content-disposition header to MIME-style ([#2512](https://github.com/gin-gonic/gin/pull/2512)) +* reduce allocs and improve the render `WriteString` ([#2508](https://github.com/gin-gonic/gin/pull/2508)) +* implement ".Unwrap() error" on Error type ([#2525](https://github.com/gin-gonic/gin/pull/2525)) ([#2526](https://github.com/gin-gonic/gin/pull/2526)) +* Allow bind with a map[string]string ([#2484](https://github.com/gin-gonic/gin/pull/2484)) +* chore: update tree ([#2371](https://github.com/gin-gonic/gin/pull/2371)) +* Support binding for slice/array obj [Rewrite] ([#2302](https://github.com/gin-gonic/gin/pull/2302)) +* basic auth: fix timing oracle ([#2609](https://github.com/gin-gonic/gin/pull/2609)) +* Add mixed param and non-param paths (port of httprouter[#329](https://github.com/gin-gonic/gin/pull/329)) ([#2663](https://github.com/gin-gonic/gin/pull/2663)) +* feat(engine): add trustedproxies and remoteIP ([#2632](https://github.com/gin-gonic/gin/pull/2632)) + +## Gin v1.6.3 + +### ENHANCEMENTS + + * Improve performance: Change `*sync.RWMutex` to `sync.RWMutex` in context. [#2351](https://github.com/gin-gonic/gin/pull/2351) + +## Gin v1.6.2 + +### BUG FIXES + + * fix missing initial sync.RWMutex [#2305](https://github.com/gin-gonic/gin/pull/2305) + +### ENHANCEMENTS + + * Add set samesite in cookie. [#2306](https://github.com/gin-gonic/gin/pull/2306) + +## Gin v1.6.1 + +### BUG FIXES + + * Revert "fix accept incoming network connections" [#2294](https://github.com/gin-gonic/gin/pull/2294) + +## Gin v1.6.0 + +### BREAKING + + * chore(performance): Improve performance for adding RemoveExtraSlash flag [#2159](https://github.com/gin-gonic/gin/pull/2159) + * drop support govendor [#2148](https://github.com/gin-gonic/gin/pull/2148) + * Added support for SameSite cookie flag [#1615](https://github.com/gin-gonic/gin/pull/1615) + +### FEATURES + + * add yaml negotiation [#2220](https://github.com/gin-gonic/gin/pull/2220) + * FileFromFS [#2112](https://github.com/gin-gonic/gin/pull/2112) + +### BUG FIXES + + * Unix Socket Handling [#2280](https://github.com/gin-gonic/gin/pull/2280) + * Use json marshall in context json to fix breaking new line issue. Fixes #2209 [#2228](https://github.com/gin-gonic/gin/pull/2228) + * fix accept incoming network connections [#2216](https://github.com/gin-gonic/gin/pull/2216) + * Fixed a bug in the calculation of the maximum number of parameters [#2166](https://github.com/gin-gonic/gin/pull/2166) + * [FIX] allow empty headers on DataFromReader [#2121](https://github.com/gin-gonic/gin/pull/2121) + * Add mutex for protect Context.Keys map [#1391](https://github.com/gin-gonic/gin/pull/1391) + +### ENHANCEMENTS + + * Add mitigation for log injection [#2277](https://github.com/gin-gonic/gin/pull/2277) + * tree: range over nodes values [#2229](https://github.com/gin-gonic/gin/pull/2229) + * tree: remove duplicate assignment [#2222](https://github.com/gin-gonic/gin/pull/2222) + * chore: upgrade go-isatty and json-iterator/go [#2215](https://github.com/gin-gonic/gin/pull/2215) + * path: sync code with httprouter [#2212](https://github.com/gin-gonic/gin/pull/2212) + * Use zero-copy approach to convert types between string and byte slice [#2206](https://github.com/gin-gonic/gin/pull/2206) + * Reuse bytes when cleaning the URL paths [#2179](https://github.com/gin-gonic/gin/pull/2179) + * tree: remove one else statement [#2177](https://github.com/gin-gonic/gin/pull/2177) + * tree: sync httprouter update (#2173) (#2172) [#2171](https://github.com/gin-gonic/gin/pull/2171) + * tree: sync part httprouter codes and reduce if/else [#2163](https://github.com/gin-gonic/gin/pull/2163) + * use http method constant [#2155](https://github.com/gin-gonic/gin/pull/2155) + * upgrade go-validator to v10 [#2149](https://github.com/gin-gonic/gin/pull/2149) + * Refactor redirect request in gin.go [#1970](https://github.com/gin-gonic/gin/pull/1970) + * Add build tag nomsgpack [#1852](https://github.com/gin-gonic/gin/pull/1852) + +### DOCS + + * docs(path): improve comments [#2223](https://github.com/gin-gonic/gin/pull/2223) + * Renew README to fit the modification of SetCookie method [#2217](https://github.com/gin-gonic/gin/pull/2217) + * Fix spelling [#2202](https://github.com/gin-gonic/gin/pull/2202) + * Remove broken link from README. [#2198](https://github.com/gin-gonic/gin/pull/2198) + * Update docs on Context.Done(), Context.Deadline() and Context.Err() [#2196](https://github.com/gin-gonic/gin/pull/2196) + * Update validator to v10 [#2190](https://github.com/gin-gonic/gin/pull/2190) + * upgrade go-validator to v10 for README [#2189](https://github.com/gin-gonic/gin/pull/2189) + * Update to currently output [#2188](https://github.com/gin-gonic/gin/pull/2188) + * Fix "Custom Validators" example [#2186](https://github.com/gin-gonic/gin/pull/2186) + * Add project to README [#2165](https://github.com/gin-gonic/gin/pull/2165) + * docs(benchmarks): for gin v1.5 [#2153](https://github.com/gin-gonic/gin/pull/2153) + * Changed wording for clarity in README.md [#2122](https://github.com/gin-gonic/gin/pull/2122) + +### MISC + + * ci support go1.14 [#2262](https://github.com/gin-gonic/gin/pull/2262) + * chore: upgrade depend version [#2231](https://github.com/gin-gonic/gin/pull/2231) + * Drop support go1.10 [#2147](https://github.com/gin-gonic/gin/pull/2147) + * fix comment in `mode.go` [#2129](https://github.com/gin-gonic/gin/pull/2129) + +## Gin v1.5.0 + +- [FIX] Use DefaultWriter and DefaultErrorWriter for debug messages [#1891](https://github.com/gin-gonic/gin/pull/1891) +- [NEW] Now you can parse the inline lowercase start structure [#1893](https://github.com/gin-gonic/gin/pull/1893) +- [FIX] Some code improvements [#1909](https://github.com/gin-gonic/gin/pull/1909) +- [FIX] Use encode replace json marshal increase json encoder speed [#1546](https://github.com/gin-gonic/gin/pull/1546) +- [NEW] Hold matched route full path in the Context [#1826](https://github.com/gin-gonic/gin/pull/1826) +- [FIX] Fix context.Params race condition on Copy() [#1841](https://github.com/gin-gonic/gin/pull/1841) +- [NEW] Add context param query cache [#1450](https://github.com/gin-gonic/gin/pull/1450) +- [FIX] Improve GetQueryMap performance [#1918](https://github.com/gin-gonic/gin/pull/1918) +- [FIX] Improve get post data [#1920](https://github.com/gin-gonic/gin/pull/1920) +- [FIX] Use context instead of x/net/context [#1922](https://github.com/gin-gonic/gin/pull/1922) +- [FIX] Attempt to fix PostForm cache bug [#1931](https://github.com/gin-gonic/gin/pull/1931) +- [NEW] Add support of multipart multi files [#1949](https://github.com/gin-gonic/gin/pull/1949) +- [NEW] Support bind http header param [#1957](https://github.com/gin-gonic/gin/pull/1957) +- [FIX] Drop support for go1.8 and go1.9 [#1933](https://github.com/gin-gonic/gin/pull/1933) +- [FIX] Bugfix for the FullPath feature [#1919](https://github.com/gin-gonic/gin/pull/1919) +- [FIX] Gin1.5 bytes.Buffer to strings.Builder [#1939](https://github.com/gin-gonic/gin/pull/1939) +- [FIX] Upgrade github.com/ugorji/go/codec [#1969](https://github.com/gin-gonic/gin/pull/1969) +- [NEW] Support bind unix time [#1980](https://github.com/gin-gonic/gin/pull/1980) +- [FIX] Simplify code [#2004](https://github.com/gin-gonic/gin/pull/2004) +- [NEW] Support negative Content-Length in DataFromReader [#1981](https://github.com/gin-gonic/gin/pull/1981) +- [FIX] Identify terminal on a RISC-V architecture for auto-colored logs [#2019](https://github.com/gin-gonic/gin/pull/2019) +- [BREAKING] `Context.JSONP()` now expects a semicolon (`;`) at the end [#2007](https://github.com/gin-gonic/gin/pull/2007) +- [BREAKING] Upgrade default `binding.Validator` to v9 (see [its changelog](https://github.com/go-playground/validator/releases/tag/v9.0.0)) [#1015](https://github.com/gin-gonic/gin/pull/1015) +- [NEW] Add `DisallowUnknownFields()` in `Context.BindJSON()` [#2028](https://github.com/gin-gonic/gin/pull/2028) +- [NEW] Use specific `net.Listener` with `Engine.RunListener()` [#2023](https://github.com/gin-gonic/gin/pull/2023) +- [FIX] Fix some typo [#2079](https://github.com/gin-gonic/gin/pull/2079) [#2080](https://github.com/gin-gonic/gin/pull/2080) +- [FIX] Relocate binding body tests [#2086](https://github.com/gin-gonic/gin/pull/2086) +- [FIX] Use Writer in Context.Status [#1606](https://github.com/gin-gonic/gin/pull/1606) +- [FIX] `Engine.RunUnix()` now returns the error if it can't change the file mode [#2093](https://github.com/gin-gonic/gin/pull/2093) +- [FIX] `RouterGroup.StaticFS()` leaked files. Now it closes them. [#2118](https://github.com/gin-gonic/gin/pull/2118) +- [FIX] `Context.Request.FormFile` leaked file. Now it closes it. [#2114](https://github.com/gin-gonic/gin/pull/2114) +- [FIX] Ignore walking on `form:"-"` mapping [#1943](https://github.com/gin-gonic/gin/pull/1943) + +### Gin v1.4.0 + +- [NEW] Support for [Go Modules](https://github.com/golang/go/wiki/Modules) [#1569](https://github.com/gin-gonic/gin/pull/1569) +- [NEW] Refactor of form mapping multipart request [#1829](https://github.com/gin-gonic/gin/pull/1829) +- [FIX] Truncate Latency precision in long running request [#1830](https://github.com/gin-gonic/gin/pull/1830) +- [FIX] IsTerm flag should not be affected by DisableConsoleColor method. [#1802](https://github.com/gin-gonic/gin/pull/1802) +- [NEW] Supporting file binding [#1264](https://github.com/gin-gonic/gin/pull/1264) +- [NEW] Add support for mapping arrays [#1797](https://github.com/gin-gonic/gin/pull/1797) +- [FIX] Readme updates [#1793](https://github.com/gin-gonic/gin/pull/1793) [#1788](https://github.com/gin-gonic/gin/pull/1788) [1789](https://github.com/gin-gonic/gin/pull/1789) +- [FIX] StaticFS: Fixed Logging two log lines on 404. [#1805](https://github.com/gin-gonic/gin/pull/1805), [#1804](https://github.com/gin-gonic/gin/pull/1804) +- [NEW] Make context.Keys available as LogFormatterParams [#1779](https://github.com/gin-gonic/gin/pull/1779) +- [NEW] Use internal/json for Marshal/Unmarshal [#1791](https://github.com/gin-gonic/gin/pull/1791) +- [NEW] Support mapping time.Duration [#1794](https://github.com/gin-gonic/gin/pull/1794) +- [NEW] Refactor form mappings [#1749](https://github.com/gin-gonic/gin/pull/1749) +- [NEW] Added flag to context.Stream indicates if client disconnected in middle of stream [#1252](https://github.com/gin-gonic/gin/pull/1252) +- [FIX] Moved [examples](https://github.com/gin-gonic/examples) to stand alone Repo [#1775](https://github.com/gin-gonic/gin/pull/1775) +- [NEW] Extend context.File to allow for the content-disposition attachments via a new method context.Attachment [#1260](https://github.com/gin-gonic/gin/pull/1260) +- [FIX] Support HTTP content negotiation wildcards [#1112](https://github.com/gin-gonic/gin/pull/1112) +- [NEW] Add prefix from X-Forwarded-Prefix in redirectTrailingSlash [#1238](https://github.com/gin-gonic/gin/pull/1238) +- [FIX] context.Copy() race condition [#1020](https://github.com/gin-gonic/gin/pull/1020) +- [NEW] Add context.HandlerNames() [#1729](https://github.com/gin-gonic/gin/pull/1729) +- [FIX] Change color methods to public in the defaultLogger. [#1771](https://github.com/gin-gonic/gin/pull/1771) +- [FIX] Update writeHeaders method to use http.Header.Set [#1722](https://github.com/gin-gonic/gin/pull/1722) +- [NEW] Add response size to LogFormatterParams [#1752](https://github.com/gin-gonic/gin/pull/1752) +- [NEW] Allow ignoring field on form mapping [#1733](https://github.com/gin-gonic/gin/pull/1733) +- [NEW] Add a function to force color in console output. [#1724](https://github.com/gin-gonic/gin/pull/1724) +- [FIX] Context.Next() - recheck len of handlers on every iteration. [#1745](https://github.com/gin-gonic/gin/pull/1745) +- [FIX] Fix all errcheck warnings [#1739](https://github.com/gin-gonic/gin/pull/1739) [#1653](https://github.com/gin-gonic/gin/pull/1653) +- [NEW] context: inherits context cancellation and deadline from http.Request context for Go>=1.7 [#1690](https://github.com/gin-gonic/gin/pull/1690) +- [NEW] Binding for URL Params [#1694](https://github.com/gin-gonic/gin/pull/1694) +- [NEW] Add LoggerWithFormatter method [#1677](https://github.com/gin-gonic/gin/pull/1677) +- [FIX] CI testing updates [#1671](https://github.com/gin-gonic/gin/pull/1671) [#1670](https://github.com/gin-gonic/gin/pull/1670) [#1682](https://github.com/gin-gonic/gin/pull/1682) [#1669](https://github.com/gin-gonic/gin/pull/1669) +- [FIX] StaticFS(): Send 404 when path does not exist [#1663](https://github.com/gin-gonic/gin/pull/1663) +- [FIX] Handle nil body for JSON binding [#1638](https://github.com/gin-gonic/gin/pull/1638) +- [FIX] Support bind uri param [#1612](https://github.com/gin-gonic/gin/pull/1612) +- [FIX] recovery: fix issue with syscall import on google app engine [#1640](https://github.com/gin-gonic/gin/pull/1640) +- [FIX] Make sure the debug log contains line breaks [#1650](https://github.com/gin-gonic/gin/pull/1650) +- [FIX] Panic stack trace being printed during recovery of broken pipe [#1089](https://github.com/gin-gonic/gin/pull/1089) [#1259](https://github.com/gin-gonic/gin/pull/1259) +- [NEW] RunFd method to run http.Server through a file descriptor [#1609](https://github.com/gin-gonic/gin/pull/1609) +- [NEW] Yaml binding support [#1618](https://github.com/gin-gonic/gin/pull/1618) +- [FIX] Pass MaxMultipartMemory when FormFile is called [#1600](https://github.com/gin-gonic/gin/pull/1600) +- [FIX] LoadHTML* tests [#1559](https://github.com/gin-gonic/gin/pull/1559) +- [FIX] Removed use of sync.pool from HandleContext [#1565](https://github.com/gin-gonic/gin/pull/1565) +- [FIX] Format output log to os.Stderr [#1571](https://github.com/gin-gonic/gin/pull/1571) +- [FIX] Make logger use a yellow background and a darkgray text for legibility [#1570](https://github.com/gin-gonic/gin/pull/1570) +- [FIX] Remove sensitive request information from panic log. [#1370](https://github.com/gin-gonic/gin/pull/1370) +- [FIX] log.Println() does not print timestamp [#829](https://github.com/gin-gonic/gin/pull/829) [#1560](https://github.com/gin-gonic/gin/pull/1560) +- [NEW] Add PureJSON renderer [#694](https://github.com/gin-gonic/gin/pull/694) +- [FIX] Add missing copyright and update if/else [#1497](https://github.com/gin-gonic/gin/pull/1497) +- [FIX] Update msgpack usage [#1498](https://github.com/gin-gonic/gin/pull/1498) +- [FIX] Use protobuf on render [#1496](https://github.com/gin-gonic/gin/pull/1496) +- [FIX] Add support for Protobuf format response [#1479](https://github.com/gin-gonic/gin/pull/1479) +- [NEW] Set default time format in form binding [#1487](https://github.com/gin-gonic/gin/pull/1487) +- [FIX] Add BindXML and ShouldBindXML [#1485](https://github.com/gin-gonic/gin/pull/1485) +- [NEW] Upgrade dependency libraries [#1491](https://github.com/gin-gonic/gin/pull/1491) + + +## Gin v1.3.0 + +- [NEW] Add [`func (*Context) QueryMap`](https://godoc.org/github.com/gin-gonic/gin#Context.QueryMap), [`func (*Context) GetQueryMap`](https://godoc.org/github.com/gin-gonic/gin#Context.GetQueryMap), [`func (*Context) PostFormMap`](https://godoc.org/github.com/gin-gonic/gin#Context.PostFormMap) and [`func (*Context) GetPostFormMap`](https://godoc.org/github.com/gin-gonic/gin#Context.GetPostFormMap) to support `type map[string]string` as query string or form parameters, see [#1383](https://github.com/gin-gonic/gin/pull/1383) +- [NEW] Add [`func (*Context) AsciiJSON`](https://godoc.org/github.com/gin-gonic/gin#Context.AsciiJSON), see [#1358](https://github.com/gin-gonic/gin/pull/1358) +- [NEW] Add `Pusher()` in [`type ResponseWriter`](https://godoc.org/github.com/gin-gonic/gin#ResponseWriter) for supporting http2 push, see [#1273](https://github.com/gin-gonic/gin/pull/1273) +- [NEW] Add [`func (*Context) DataFromReader`](https://godoc.org/github.com/gin-gonic/gin#Context.DataFromReader) for serving dynamic data, see [#1304](https://github.com/gin-gonic/gin/pull/1304) +- [NEW] Add [`func (*Context) ShouldBindBodyWith`](https://godoc.org/github.com/gin-gonic/gin#Context.ShouldBindBodyWith) allowing to call binding multiple times, see [#1341](https://github.com/gin-gonic/gin/pull/1341) +- [NEW] Support pointers in form binding, see [#1336](https://github.com/gin-gonic/gin/pull/1336) +- [NEW] Add [`func (*Context) JSONP`](https://godoc.org/github.com/gin-gonic/gin#Context.JSONP), see [#1333](https://github.com/gin-gonic/gin/pull/1333) +- [NEW] Support default value in form binding, see [#1138](https://github.com/gin-gonic/gin/pull/1138) +- [NEW] Expose validator engine in [`type StructValidator`](https://godoc.org/github.com/gin-gonic/gin/binding#StructValidator), see [#1277](https://github.com/gin-gonic/gin/pull/1277) +- [NEW] Add [`func (*Context) ShouldBind`](https://godoc.org/github.com/gin-gonic/gin#Context.ShouldBind), [`func (*Context) ShouldBindQuery`](https://godoc.org/github.com/gin-gonic/gin#Context.ShouldBindQuery) and [`func (*Context) ShouldBindJSON`](https://godoc.org/github.com/gin-gonic/gin#Context.ShouldBindJSON), see [#1047](https://github.com/gin-gonic/gin/pull/1047) +- [NEW] Add support for `time.Time` location in form binding, see [#1117](https://github.com/gin-gonic/gin/pull/1117) +- [NEW] Add [`func (*Context) BindQuery`](https://godoc.org/github.com/gin-gonic/gin#Context.BindQuery), see [#1029](https://github.com/gin-gonic/gin/pull/1029) +- [NEW] Make [jsonite](https://github.com/json-iterator/go) optional with build tags, see [#1026](https://github.com/gin-gonic/gin/pull/1026) +- [NEW] Show query string in logger, see [#999](https://github.com/gin-gonic/gin/pull/999) +- [NEW] Add [`func (*Context) SecureJSON`](https://godoc.org/github.com/gin-gonic/gin#Context.SecureJSON), see [#987](https://github.com/gin-gonic/gin/pull/987) and [#993](https://github.com/gin-gonic/gin/pull/993) +- [DEPRECATE] `func (*Context) GetCookie` for [`func (*Context) Cookie`](https://godoc.org/github.com/gin-gonic/gin#Context.Cookie) +- [FIX] Don't display color tags if [`func DisableConsoleColor`](https://godoc.org/github.com/gin-gonic/gin#DisableConsoleColor) called, see [#1072](https://github.com/gin-gonic/gin/pull/1072) +- [FIX] Gin Mode `""` when calling [`func Mode`](https://godoc.org/github.com/gin-gonic/gin#Mode) now returns `const DebugMode`, see [#1250](https://github.com/gin-gonic/gin/pull/1250) +- [FIX] `Flush()` now doesn't overwrite `responseWriter` status code, see [#1460](https://github.com/gin-gonic/gin/pull/1460) + +## Gin 1.2.0 + +- [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) + +## Gin 1.1.4 + +- [NEW] Support google appengine for IsTerminal func + +## Gin 1.1.3 + +- [FIX] Reverted Logger: skip ANSI color commands + +## Gin 1.1 + +- [NEW] Implement QueryArray and PostArray methods +- [NEW] Refactor GetQuery and GetPostForm +- [NEW] Add contribution guide +- [FIX] Corrected typos in README +- [FIX] Removed additional Iota +- [FIX] Changed imports to gopkg instead of github in README (#733) +- [FIX] Logger: skip ANSI color commands if output is not a tty + +## Gin 1.0rc2 (...) + +- [PERFORMANCE] Fast path for writing Content-Type. +- [PERFORMANCE] Much faster 404 routing +- [PERFORMANCE] Allocation optimizations +- [PERFORMANCE] Faster root tree lookup +- [PERFORMANCE] Zero overhead, String() and JSON() rendering. +- [PERFORMANCE] Faster ClientIP parsing +- [PERFORMANCE] Much faster SSE implementation +- [NEW] Benchmarks suite +- [NEW] Bind validation can be disabled and replaced with custom validators. +- [NEW] More flexible HTML render +- [NEW] Multipart and PostForm bindings +- [NEW] Adds method to return all the registered routes +- [NEW] Context.HandlerName() returns the main handler's name +- [NEW] Adds Error.IsType() helper +- [FIX] Binding multipart form +- [FIX] Integration tests +- [FIX] Crash when binding non struct object in Context. +- [FIX] RunTLS() implementation +- [FIX] Logger() unit tests +- [FIX] Adds SetHTMLTemplate() warning +- [FIX] Context.IsAborted() +- [FIX] More unit tests +- [FIX] JSON, XML, HTML renders accept custom content-types +- [FIX] gin.AbortIndex is unexported +- [FIX] Better approach to avoid directory listing in StaticFS() +- [FIX] Context.ClientIP() always returns the IP with trimmed spaces. +- [FIX] Better warning when running in debug mode. +- [FIX] Google App Engine integration. debugPrint does not use os.Stdout +- [FIX] Fixes integer overflow in error type +- [FIX] Error implements the json.Marshaller interface +- [FIX] MIT license in every file + + +## Gin 1.0rc1 (May 22, 2015) + +- [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 typed) +- [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) + + +## Gin 0.6 (Mar 9, 2015) + +- [NEW] Support multipart/form-data +- [NEW] NoMethod handler +- [NEW] Validate sub structures +- [NEW] Support for HTTP Realm Auth +- [FIX] Unsigned integers in binding +- [FIX] Improve color logger + + +## Gin 0.5 (Feb 7, 2015) + +- [NEW] Content Negotiation +- [FIX] Solved security bug that allow a client to spoof ip +- [FIX] Fix unexported/ignored fields in binding + + +## Gin 0.4 (Aug 21, 2014) + +- [NEW] Development mode +- [NEW] Unit tests +- [NEW] Add Content.Redirect() +- [FIX] Deferring WriteHeader() +- [FIX] Improved documentation for model binding + + +## Gin 0.3 (Jul 18, 2014) + +- [PERFORMANCE] Normal log and error log are printed in the same call. +- [PERFORMANCE] Improve performance of NoRouter() +- [PERFORMANCE] Improve context's memory locality, reduce CPU cache faults. +- [NEW] Flexible rendering API +- [NEW] Add Context.File() +- [NEW] Add shortcut RunTLS() for http.ListenAndServeTLS +- [FIX] Rename NotFound404() to NoRoute() +- [FIX] Errors in context are purged +- [FIX] Adds HEAD method in Static file serving +- [FIX] Refactors Static() file serving +- [FIX] Using keyed initialization to fix app-engine integration +- [FIX] Can't unmarshal JSON array, #63 +- [FIX] Renaming Context.Req to Context.Request +- [FIX] Check application/x-www-form-urlencoded when parsing form + + +## Gin 0.2b (Jul 08, 2014) +- [PERFORMANCE] Using sync.Pool to allocatio/gc overhead +- [NEW] Travis CI integration +- [NEW] Completely new logger +- [NEW] New API for serving static files. gin.Static() +- [NEW] gin.H() can be serialized into XML +- [NEW] Typed errors. Errors can be typed. Internet/external/custom. +- [NEW] Support for Godeps +- [NEW] Travis/Godocs badges in README +- [NEW] New Bind() and BindWith() methods for parsing request body. +- [NEW] Add Content.Copy() +- [NEW] Add context.LastError() +- [NEW] Add shortcut for OPTIONS HTTP method +- [FIX] Tons of README fixes +- [FIX] Header is written before body +- [FIX] BasicAuth() and changes API a little bit +- [FIX] Recovery() middleware only prints panics +- [FIX] Context.Get() does not panic anymore. Use MustGet() instead. +- [FIX] Multiple http.WriteHeader() in NotFound handlers +- [FIX] Engine.Run() panics if http server can't be set up +- [FIX] Crash when route path doesn't start with '/' +- [FIX] Do not update header when status code is negative +- [FIX] Setting response headers before calling WriteHeader in context.String() +- [FIX] Add MIT license +- [FIX] Changes behaviour of ErrorLogger() and Logger() diff --git a/references/README.md b/references/README.md new file mode 100644 index 0000000..1b9ab80 --- /dev/null +++ b/references/README.md @@ -0,0 +1,227 @@ +# Gin Web Framework + + + +[![Build Status](https://github.com/gin-gonic/gin/actions/workflows/gin.yml/badge.svg?branch=master)](https://github.com/gin-gonic/gin/actions/workflows/gin.yml) +[![Trivy Security Scan](https://github.com/gin-gonic/gin/actions/workflows/trivy-scan.yml/badge.svg)](https://github.com/gin-gonic/gin/actions/workflows/trivy-scan.yml) +[![codecov](https://codecov.io/gh/gin-gonic/gin/branch/master/graph/badge.svg)](https://codecov.io/gh/gin-gonic/gin) +[![Go Report Card](https://goreportcard.com/badge/github.com/gin-gonic/gin)](https://goreportcard.com/report/github.com/gin-gonic/gin) +[![Go Reference](https://pkg.go.dev/badge/github.com/gin-gonic/gin?status.svg)](https://pkg.go.dev/github.com/gin-gonic/gin?tab=doc) +[![Sourcegraph](https://sourcegraph.com/github.com/gin-gonic/gin/-/badge.svg)](https://sourcegraph.com/github.com/gin-gonic/gin?badge) +[![Open Source Helpers](https://www.codetriage.com/gin-gonic/gin/badges/users.svg)](https://www.codetriage.com/gin-gonic/gin) +[![Release](https://img.shields.io/github/release/gin-gonic/gin.svg?style=flat-square)](https://github.com/gin-gonic/gin/releases) + +## ๐Ÿ“ฐ [Announcing Gin 1.11.0!](https://gin-gonic.com/en/blog/news/gin-1-11-0-release-announcement/) + +Read about the latest features and improvements in Gin 1.11.0 on our official blog. + +--- + +Gin is a high-performance HTTP web framework written in [Go](https://go.dev/). It provides a Martini-like API but with significantly better performanceโ€”up to 40 times fasterโ€”thanks to [httprouter](https://github.com/julienschmidt/httprouter). Gin is designed for building REST APIs, web applications, and microservices where speed and developer productivity are essential. + +**Why choose Gin?** + +Gin combines the simplicity of Express.js-style routing with Go's performance characteristics, making it ideal for: + +- Building high-throughput REST APIs +- Developing microservices that need to handle many concurrent requests +- Creating web applications that require fast response times +- Prototyping web services quickly with minimal boilerplate + +**Gin's key features:** + +- **Zero allocation router** - Extremely memory-efficient routing with no heap allocations +- **High performance** - Benchmarks show superior speed compared to other Go web frameworks +- **Middleware support** - Extensible middleware system for authentication, logging, CORS, etc. +- **Crash-free** - Built-in recovery middleware prevents panics from crashing your server +- **JSON validation** - Automatic request/response JSON binding and validation +- **Route grouping** - Organize related routes and apply common middleware +- **Error management** - Centralized error handling and logging +- **Built-in rendering** - Support for JSON, XML, HTML templates, and more +- **Extensible** - Large ecosystem of community middleware and plugins + +## Getting Started + +### Prerequisites + +- **Go version**: Gin requires [Go](https://go.dev/) version [1.24](https://go.dev/doc/devel/release#go1.24.0) or above +- **Basic Go knowledge**: Familiarity with Go syntax and package management is helpful + +### Installation + +With [Go's module support](https://go.dev/wiki/Modules#how-to-use-modules), simply import Gin in your code and Go will automatically fetch it during build: + +```go +import "github.com/gin-gonic/gin" +``` + +### Your First Gin Application + +Here's a complete example that demonstrates Gin's simplicity: + +```go +package main + +import ( + "log" + "net/http" + + "github.com/gin-gonic/gin" +) + +func main() { + // Create a Gin router with default middleware (logger and recovery) + r := gin.Default() + + // Define a simple GET endpoint + r.GET("/ping", func(c *gin.Context) { + // Return JSON response + c.JSON(http.StatusOK, gin.H{ + "message": "pong", + }) + }) + + // Start server on port 8080 (default) + // Server will listen on 0.0.0.0:8080 (localhost:8080 on Windows) + if err := r.Run(); err != nil { + log.Fatalf("failed to run server: %v", err) + } +} +``` + +**Running the application:** + +1. Save the code above as `main.go` +2. Run the application: + + ```sh + go run main.go + ``` + +3. Open your browser and visit [`http://localhost:8080/ping`](http://localhost:8080/ping) +4. You should see: `{"message":"pong"}` + +**What this example demonstrates:** + +- Creating a Gin router with default middleware +- Defining HTTP endpoints with simple handler functions +- Returning JSON responses +- Starting an HTTP server + +### Next Steps + +After running your first Gin application, explore these resources to learn more: + +#### ๐Ÿ“š Learning Resources + +- **[Gin Quick Start Guide](docs/doc.md)** - Comprehensive tutorial with API examples and build configurations +- **[Example Repository](https://github.com/gin-gonic/examples)** - Ready-to-run examples demonstrating various Gin use cases: + - REST API development + - Authentication & middleware + - File uploads and downloads + - WebSocket connections + - Template rendering + +## ๐Ÿ“– Documentation + +### API Reference + +- **[Go.dev API Documentation](https://pkg.go.dev/github.com/gin-gonic/gin)** - Complete API reference with examples + +### User Guides + +The comprehensive documentation is available on [gin-gonic.com](https://gin-gonic.com) in multiple languages: + +- [English](https://gin-gonic.com/en/docs/) | [็ฎ€ไฝ“ไธญๆ–‡](https://gin-gonic.com/zh-cn/docs/) | [็น้ซ”ไธญๆ–‡](https://gin-gonic.com/zh-tw/docs/) +- [ๆ—ฅๆœฌ่ชž](https://gin-gonic.com/ja/docs/) | [ํ•œ๊ตญ์–ด](https://gin-gonic.com/ko-kr/docs/) | [Espaรฑol](https://gin-gonic.com/es/docs/) +- [Turkish](https://gin-gonic.com/tr/docs/) | [Persian](https://gin-gonic.com/fa/docs/) | [Portuguรชs](https://gin-gonic.com/pt/docs/) +- [Russian](https://gin-gonic.com/ru/docs/) | [Indonesian](https://gin-gonic.com/id/docs/) + +### Official Tutorials + +- [Go.dev Tutorial: Developing a RESTful API with Go and Gin](https://go.dev/doc/tutorial/web-service-gin) + +## โšก Performance Benchmarks + +Gin demonstrates exceptional performance compared to other Go web frameworks. It uses a custom version of [HttpRouter](https://github.com/julienschmidt/httprouter) for maximum efficiency. [View detailed benchmarks โ†’](/BENCHMARKS.md) + +**Gin vs. Other Go Frameworks** (GitHub API routing benchmark): + +| Benchmark name | (1) | (2) | (3) | (4) | +| ------------------------------ | --------: | --------------: | -----------: | --------------: | +| BenchmarkGin_GithubAll | **43550** | **27364 ns/op** | **0 B/op** | **0 allocs/op** | +| BenchmarkAce_GithubAll | 40543 | 29670 ns/op | 0 B/op | 0 allocs/op | +| BenchmarkAero_GithubAll | 57632 | 20648 ns/op | 0 B/op | 0 allocs/op | +| BenchmarkBear_GithubAll | 9234 | 216179 ns/op | 86448 B/op | 943 allocs/op | +| BenchmarkBeego_GithubAll | 7407 | 243496 ns/op | 71456 B/op | 609 allocs/op | +| BenchmarkBone_GithubAll | 420 | 2922835 ns/op | 720160 B/op | 8620 allocs/op | +| BenchmarkChi_GithubAll | 7620 | 238331 ns/op | 87696 B/op | 609 allocs/op | +| BenchmarkDenco_GithubAll | 18355 | 64494 ns/op | 20224 B/op | 167 allocs/op | +| BenchmarkEcho_GithubAll | 31251 | 38479 ns/op | 0 B/op | 0 allocs/op | +| BenchmarkGocraftWeb_GithubAll | 4117 | 300062 ns/op | 131656 B/op | 1686 allocs/op | +| BenchmarkGoji_GithubAll | 3274 | 416158 ns/op | 56112 B/op | 334 allocs/op | +| BenchmarkGojiv2_GithubAll | 1402 | 870518 ns/op | 352720 B/op | 4321 allocs/op | +| BenchmarkGoJsonRest_GithubAll | 2976 | 401507 ns/op | 134371 B/op | 2737 allocs/op | +| BenchmarkGoRestful_GithubAll | 410 | 2913158 ns/op | 910144 B/op | 2938 allocs/op | +| BenchmarkGorillaMux_GithubAll | 346 | 3384987 ns/op | 251650 B/op | 1994 allocs/op | +| BenchmarkGowwwRouter_GithubAll | 10000 | 143025 ns/op | 72144 B/op | 501 allocs/op | +| BenchmarkHttpRouter_GithubAll | 55938 | 21360 ns/op | 0 B/op | 0 allocs/op | +| BenchmarkHttpTreeMux_GithubAll | 10000 | 153944 ns/op | 65856 B/op | 671 allocs/op | +| BenchmarkKocha_GithubAll | 10000 | 106315 ns/op | 23304 B/op | 843 allocs/op | +| BenchmarkLARS_GithubAll | 47779 | 25084 ns/op | 0 B/op | 0 allocs/op | +| BenchmarkMacaron_GithubAll | 3266 | 371907 ns/op | 149409 B/op | 1624 allocs/op | +| BenchmarkMartini_GithubAll | 331 | 3444706 ns/op | 226551 B/op | 2325 allocs/op | +| BenchmarkPat_GithubAll | 273 | 4381818 ns/op | 1483152 B/op | 26963 allocs/op | +| BenchmarkPossum_GithubAll | 10000 | 164367 ns/op | 84448 B/op | 609 allocs/op | +| BenchmarkR2router_GithubAll | 10000 | 160220 ns/op | 77328 B/op | 979 allocs/op | +| BenchmarkRivet_GithubAll | 14625 | 82453 ns/op | 16272 B/op | 167 allocs/op | +| BenchmarkTango_GithubAll | 6255 | 279611 ns/op | 63826 B/op | 1618 allocs/op | +| BenchmarkTigerTonic_GithubAll | 2008 | 687874 ns/op | 193856 B/op | 4474 allocs/op | +| BenchmarkTraffic_GithubAll | 355 | 3478508 ns/op | 820744 B/op | 14114 allocs/op | +| BenchmarkVulcan_GithubAll | 6885 | 193333 ns/op | 19894 B/op | 609 allocs/op | + +- (1): Total Repetitions achieved in constant time, higher means more confident result +- (2): Single Repetition Duration (ns/op), lower is better +- (3): Heap Memory (B/op), lower is better +- (4): Average Allocations per Repetition (allocs/op), lower is better + +## ๐Ÿ”Œ Middleware Ecosystem + +Gin has a rich ecosystem of middleware for common web development needs. Explore community-contributed middleware: + +- **[gin-contrib](https://github.com/gin-contrib)** - Official middleware collection including: + - Authentication (JWT, Basic Auth, Sessions) + - CORS, Rate limiting, Compression + - Logging, Metrics, Tracing + - Static file serving, Template engines +- **[gin-gonic/contrib](https://github.com/gin-gonic/contrib)** - Additional community middleware + +## ๐Ÿข Production Usage + +Gin powers many high-traffic applications and services in production: + +- **[gorush](https://github.com/appleboy/gorush)** - High-performance push notification server +- **[fnproject](https://github.com/fnproject/fn)** - Container-native, serverless platform +- **[photoprism](https://github.com/photoprism/photoprism)** - AI-powered personal photo management +- **[lura](https://github.com/luraproject/lura)** - Ultra-performant API Gateway framework +- **[picfit](https://github.com/thoas/picfit)** - Real-time image processing server +- **[dkron](https://github.com/distribworks/dkron)** - Distributed job scheduling system + +## ๐Ÿค Contributing + +Gin is the work of hundreds of contributors from around the world. We welcome and appreciate your contributions! + +### How to Contribute + +- ๐Ÿ› **Report bugs** - Help us identify and fix issues +- ๐Ÿ’ก **Suggest features** - Share your ideas for improvements +- ๐Ÿ“ **Improve documentation** - Help make our docs clearer +- ๐Ÿ”ง **Submit code** - Fix bugs or implement new features +- ๐Ÿงช **Write tests** - Improve our test coverage + +### Getting Started with Contributing + +1. Check out our [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines +2. Join our community discussions and ask questions + +**All contributions are valued and help make Gin better for everyone!** diff --git a/references/file_structure.md b/references/file_structure.md new file mode 100644 index 0000000..dba1c4c --- /dev/null +++ b/references/file_structure.md @@ -0,0 +1,150 @@ +# Repository File Structure + +Total items: 144 + +``` +๐Ÿ“ .github +๐Ÿ“„ .gitignore +๐Ÿ“„ .golangci.yml +๐Ÿ“„ .goreleaser.yaml +๐Ÿ“„ AUTHORS.md +๐Ÿ“„ BENCHMARKS.md +๐Ÿ“„ CHANGELOG.md +๐Ÿ“„ CODE_OF_CONDUCT.md +๐Ÿ“„ CONTRIBUTING.md +๐Ÿ“„ LICENSE +๐Ÿ“„ Makefile +๐Ÿ“„ README.md +๐Ÿ“„ auth.go +๐Ÿ“„ auth_test.go +๐Ÿ“„ benchmarks_test.go +๐Ÿ“ binding +๐Ÿ“ codec +๐Ÿ“„ codecov.yml +๐Ÿ“„ context.go +๐Ÿ“„ context_appengine.go +๐Ÿ“„ context_file_test.go +๐Ÿ“„ context_test.go +๐Ÿ“„ debug.go +๐Ÿ“„ debug_test.go +๐Ÿ“„ deprecated.go +๐Ÿ“„ deprecated_test.go +๐Ÿ“„ doc.go +๐Ÿ“ docs +๐Ÿ“„ errors.go +๐Ÿ“„ errors_test.go +๐Ÿ“ examples +๐Ÿ“„ fs.go +๐Ÿ“„ fs_test.go +๐Ÿ“„ gin.go +๐Ÿ“ ginS +๐Ÿ“„ gin_integration_test.go +๐Ÿ“„ gin_test.go +๐Ÿ“„ githubapi_test.go +๐Ÿ“„ go.mod +๐Ÿ“„ go.sum +๐Ÿ“ internal +๐Ÿ“„ logger.go +๐Ÿ“„ logger_test.go +๐Ÿ“„ middleware_test.go +๐Ÿ“„ mode.go +๐Ÿ“„ mode_test.go +๐Ÿ“„ path.go +๐Ÿ“„ path_test.go +๐Ÿ“„ recovery.go +๐Ÿ“„ recovery_test.go +๐Ÿ“ render +๐Ÿ“„ response_writer.go +๐Ÿ“„ response_writer_test.go +๐Ÿ“„ routergroup.go +๐Ÿ“„ routergroup_test.go +๐Ÿ“„ routes_test.go +๐Ÿ“„ test_helpers.go +๐Ÿ“ testdata +๐Ÿ“„ tree.go +๐Ÿ“„ tree_test.go +๐Ÿ“„ utils.go +๐Ÿ“„ utils_test.go +๐Ÿ“„ version.go + ๐Ÿ“ ISSUE_TEMPLATE + ๐Ÿ“„ PULL_REQUEST_TEMPLATE.md + ๐Ÿ“„ dependabot.yml + ๐Ÿ“ workflows + ๐Ÿ“„ binding.go + ๐Ÿ“„ binding_msgpack_test.go + ๐Ÿ“„ binding_nomsgpack.go + ๐Ÿ“„ binding_test.go + ๐Ÿ“„ default_validator.go + ๐Ÿ“„ default_validator_benchmark_test.go + ๐Ÿ“„ default_validator_test.go + ๐Ÿ“„ form.go + ๐Ÿ“„ form_mapping.go + ๐Ÿ“„ form_mapping_benchmark_test.go + ๐Ÿ“„ form_mapping_test.go + ๐Ÿ“„ header.go + ๐Ÿ“„ json.go + ๐Ÿ“„ json_test.go + ๐Ÿ“„ msgpack.go + ๐Ÿ“„ msgpack_test.go + ๐Ÿ“„ multipart_form_mapping.go + ๐Ÿ“„ multipart_form_mapping_test.go + ๐Ÿ“„ plain.go + ๐Ÿ“„ protobuf.go + ๐Ÿ“„ query.go + ๐Ÿ“„ toml.go + ๐Ÿ“„ toml_test.go + ๐Ÿ“„ uri.go + ๐Ÿ“„ validate_test.go + ๐Ÿ“„ xml.go + ๐Ÿ“„ xml_test.go + ๐Ÿ“„ yaml.go + ๐Ÿ“„ yaml_test.go + ๐Ÿ“ json + ๐Ÿ“„ doc.md + ๐Ÿ“„ README.md + ๐Ÿ“„ README.md + ๐Ÿ“„ gins.go + ๐Ÿ“ bytesconv + ๐Ÿ“ fs + ๐Ÿ“„ data.go + ๐Ÿ“„ html.go + ๐Ÿ“„ json.go + ๐Ÿ“„ msgpack.go + ๐Ÿ“„ protobuf.go + ๐Ÿ“„ reader.go + ๐Ÿ“„ reader_test.go + ๐Ÿ“„ redirect.go + ๐Ÿ“„ render.go + ๐Ÿ“„ render_msgpack_test.go + ๐Ÿ“„ render_test.go + ๐Ÿ“„ text.go + ๐Ÿ“„ toml.go + ๐Ÿ“„ xml.go + ๐Ÿ“„ yaml.go + ๐Ÿ“ certificate + ๐Ÿ“ protoexample + ๐Ÿ“ template + ๐Ÿ“„ test_file.txt + ๐Ÿ“„ bug-report.yaml + ๐Ÿ“„ config.yml + ๐Ÿ“„ feature-request.yaml + ๐Ÿ“„ codeql.yml + ๐Ÿ“„ gin.yml + ๐Ÿ“„ goreleaser.yml + ๐Ÿ“„ trivy-scan.yml + ๐Ÿ“„ api.go + ๐Ÿ“„ go_json.go + ๐Ÿ“„ json.go + ๐Ÿ“„ jsoniter.go + ๐Ÿ“„ sonic.go + ๐Ÿ“„ bytesconv.go + ๐Ÿ“„ bytesconv_test.go + ๐Ÿ“„ fs.go + ๐Ÿ“„ fs_test.go + ๐Ÿ“„ cert.pem + ๐Ÿ“„ key.pem + ๐Ÿ“„ test.pb.go + ๐Ÿ“„ test.proto + ๐Ÿ“„ hello.tmpl + ๐Ÿ“„ raw.tmpl +``` diff --git a/references/index.md b/references/index.md new file mode 100644 index 0000000..5e9303c --- /dev/null +++ b/references/index.md @@ -0,0 +1,7 @@ +# Gin Documentation Index + +## Categories + +### Other +**File:** `other.md` +**Pages:** 4 diff --git a/references/issues.md b/references/issues.md new file mode 100644 index 0000000..833ff60 --- /dev/null +++ b/references/issues.md @@ -0,0 +1,65 @@ +# GitHub Issues + +Recent issues from the repository (14 total). + +## Open Issues (8) + +### #4033: [Bug] UnescapePathValues = false still unescapes path values +**Labels:** No labels | **Created:** 2024-08-20 +[View on GitHub](https://github.com/gin-gonic/gin/issues/4033) + +### #4413: Literal colon routes don't work properly in non-Run() scenarios +**Labels:** type/bug | **Created:** 2025-10-30 +[View on GitHub](https://github.com/gin-gonic/gin/issues/4413) + +### #4393: Dynamically change paths to match while running +**Labels:** type/proposal | **Created:** 2025-10-10 +[View on GitHub](https://github.com/gin-gonic/gin/issues/4393) + +### #4411: Feature Request: Optional trailing slash handling (without redirect) +**Labels:** type/proposal | **Created:** 2025-10-29 +[View on GitHub](https://github.com/gin-gonic/gin/issues/4411) + +### #3934: send response from middleware, continue to execute handler chain +**Labels:** No labels | **Created:** 2024-04-25 +[View on GitHub](https://github.com/gin-gonic/gin/issues/3934) + +### #4218: ShouldBindBodyWithJSON : binding:"required" + bool field causes validation error when passing false +**Labels:** No labels | **Created:** 2025-04-15 +[View on GitHub](https://github.com/gin-gonic/gin/issues/4218) + +### #4358: I visualized gin benchmarks using a single command +**Labels:** No labels | **Created:** 2025-09-20 +[View on GitHub](https://github.com/gin-gonic/gin/issues/4358) + +### #1224: Middleware must be added before endpoints +**Labels:** No labels | **Created:** 2018-01-13 +[View on GitHub](https://github.com/gin-gonic/gin/issues/1224) + + +## Recently Closed Issues (6) + +### #3723: Expose an interface to reload TLS cert +**Labels:** No labels | **Closed:** 2025-11-06 +[View on GitHub](https://github.com/gin-gonic/gin/issues/3723) + +### #4419: url.setPath does not set RawPath for "foo%252Fbar" +**Labels:** type/bug | **Closed:** 2025-11-04 +[View on GitHub](https://github.com/gin-gonic/gin/issues/4419) + +### #4416: Add an official rate limiting middleware API. +**Labels:** type/proposal | **Closed:** 2025-11-02 +[View on GitHub](https://github.com/gin-gonic/gin/issues/4416) + +### #4401: Bind Query not call UnmarshalText +**Labels:** type/bug | **Closed:** 2025-10-21 +[View on GitHub](https://github.com/gin-gonic/gin/issues/4401) + +### #4397: Add Context.Delete / Context.Remove method for safe key deletion +**Labels:** type/proposal | **Closed:** 2025-10-17 +[View on GitHub](https://github.com/gin-gonic/gin/issues/4397) + +### #2980: imports github.com/gin-gonic/gin: import cycle not allowed +**Labels:** No labels | **Closed:** 2021-12-09 +[View on GitHub](https://github.com/gin-gonic/gin/issues/2980) + diff --git a/references/other.md b/references/other.md new file mode 100644 index 0000000..c026f48 --- /dev/null +++ b/references/other.md @@ -0,0 +1,33 @@ +# Gin - Other + +**Pages:** 4 + +--- + +## Users + +**URL:** https://gin-gonic.com/en/docs/users + +--- + +## Gin Web Framework + +**URL:** https://gin-gonic.com/en + +Radix tree based routing, small memory foot print. No reflection. Predictable API performance. + +--- + +## Gin Web Framework + +**URL:** https://gin-gonic.com/ + +Radix tree based routing, small memory foot print. No reflection. Predictable API performance. + +--- + +## Documentation + +**URL:** https://gin-gonic.com/en/docs/ + +--- diff --git a/references/releases.md b/references/releases.md new file mode 100644 index 0000000..e77758a --- /dev/null +++ b/references/releases.md @@ -0,0 +1,916 @@ +# 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](https://github.com/gin-gonic/gin/releases/tag/v1.11.0) + +--- + +## 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](https://github.com/gin-gonic/gin/releases/tag/v1.10.1) + +--- + +## 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](https://github.com/gin-gonic/gin/releases/tag/v1.10.0) + +--- + +## v1.9.1: v1.9.1 +**Published:** 2023-06-01 + +## Changelog + +### BUG FIXES + +* fix Request.Context() checks [#3512](https://github.com/gin-gonic/gin/pull/3512) + +### SECURITY + +* fix lack of escaping of filename in Content-Disposition [#3556](https://github.com/gin-gonic/gin/pull/3556) + +### ENHANCEMENTS + +* refactor: use bytes.ReplaceAll directly [#3455](https://github.com/gin-gonic/gin/pull/3455) +* convert strings and slices using the officially recommended way [#3344](https://github.com/gin-gonic/gin/pull/3344) +* improve render code coverage [#3525](https://github.com/gin-gonic/gin/pull/3525) + +### DOCS + +* docs: changed documentation link for trusted proxies [#3575](https://github.com/gin-gonic/gin/pull/3575) +* chore: improve linting, testing, and GitHub Actions setup [#3583](https://github.com/gin-gonic/gin/pull/3583) + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.9.1) + +--- + +## v1.9.0: v1.9.0 +**Published:** 2023-02-21 + +## Changelog + +### BREAK CHANGES + +* Stop useless panicking in context and render [#2150](https://github.com/gin-gonic/gin/pull/2150) + +### BUG FIXES + +* fix(router): tree bug where loop index is not decremented. [#3460](https://github.com/gin-gonic/gin/pull/3460) +* fix(context): panic on NegotiateFormat - index out of range [#3397](https://github.com/gin-gonic/gin/pull/3397) +* Add escape logic for header [#3500](https://github.com/gin-gonic/gin/pull/3500) and [#3503](https://github.com/gin-gonic/gin/pull/3503) + +### SECURITY + +* Fix the GO-2022-0969 and GO-2022-0288 vulnerabilities [#3333](https://github.com/gin-gonic/gin/pull/3333) +* fix(security): vulnerability GO-2023-1571 [#3505](https://github.com/gin-gonic/gin/pull/3505) + +### ENHANCEMENTS + +* feat: add sonic json support [#3184](https://github.com/gin-gonic/gin/pull/3184) +* chore(file): Creates a directory named path [#3316](https://github.com/gin-gonic/gin/pull/3316) +* fix: modify interface check way [#3327](https://github.com/gin-gonic/gin/pull/3327) +* remove deprecated of package io/ioutil [#3395](https://github.com/gin-gonic/gin/pull/3395) +* refactor: avoid calling strings.ToLower twice [#3343](https://github.com/gin-gonic/gin/pull/3433) +* console logger HTTP status code bug fixed [#3453](https://github.com/gin-gonic/gin/pull/3453) +* chore(yaml): upgrade dependency to v3 version [#3456](https://github.com/gin-gonic/gin/pull/3456) +* chore(router): match method added to routergroup for multiple HTTP methods supporting [#3464](https://github.com/gin-gonic/gin/pull/3464) +* chore(http): add support for go1.20 http.rwUnwrapper to gin.responseWriter [#3489](https://github.com/gin-gonic/gin/pull/3489) + +### DOCS + +* docs: update markdown format [#3260](https://github.com/gin-gonic/gin/pull/3260) +* docs(readme): Add the TOML rendering example [#3400](https://github.com/gin-gonic/gin/pull/3400) +* docs(readme): move more example to docs/doc.md [#3449](https://github.com/gin-gonic/gin/pull/3449) +* docs: update markdown format [#3446](https://github.com/gin-gonic/gin/pull/3446) + + + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.9.0) + +--- + +## 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](https://github.com/gin-gonic/gin/releases/tag/v1.8.2) + +--- + +## v1.8.1: v1.8.1 +**Published:** 2022-06-06 + +## Changelog + +### Features +* f197a8b feat(context): add ContextWithFallback feature flag (#3166) (#3172) + + + + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.8.1) + +--- + +## v1.8.0: v1.8.0 +**Published:** 2022-05-30 + +## Changelog + +## Break Changes + +* TrustedProxies: Add default IPv6 support and refactor [#2967](https://github.com/gin-gonic/gin/pull/2967). Please replace `RemoteIP() (net.IP, bool)` with `RemoteIP() net.IP` +* gin.Context with fallback value from gin.Context.Request.Context() [#2751](https://github.com/gin-gonic/gin/pull/2751) + +### BUGFIXES + +* Fixed SetOutput() panics on go 1.17 [#2861](https://github.com/gin-gonic/gin/pull/2861) +* Fix: wrong when wildcard follows named param [#2983](https://github.com/gin-gonic/gin/pull/2983) +* Fix: missing sameSite when do context.reset() [#3123](https://github.com/gin-gonic/gin/pull/3123) + +### ENHANCEMENTS + +* Use Header() instead of deprecated HeaderMap [#2694](https://github.com/gin-gonic/gin/pull/2694) +* RouterGroup.Handle regular match optimization of http method [#2685](https://github.com/gin-gonic/gin/pull/2685) +* Add support go-json, another drop-in json replacement [#2680](https://github.com/gin-gonic/gin/pull/2680) +* Use errors.New to replace fmt.Errorf will much better [#2707](https://github.com/gin-gonic/gin/pull/2707) +* Use Duration.Truncate for truncating precision [#2711](https://github.com/gin-gonic/gin/pull/2711) +* Get client IP when using Cloudflare [#2723](https://github.com/gin-gonic/gin/pull/2723) +* Optimize code adjust [#2700](https://github.com/gin-gonic/gin/pull/2700/files) +* Optimize code and reduce code cyclomatic complexity [#2737](https://github.com/gin-gonic/gin/pull/2737) +* gin.Context with fallback value from gin.Context.Request.Context() [#2751](https://github.com/gin-gonic/gin/pull/2751) +* Improve sliceValidateError.Error performance [#2765](https://github.com/gin-gonic/gin/pull/2765) +* Support custom struct tag [#2720](https://github.com/gin-gonic/gin/pull/2720) +* Improve router group tests [#2787](https://github.com/gin-gonic/gin/pull/2787) +* Fallback Context.Deadline() Context.Done() Context.Err() to Context.Request.Context() [#2769](https://github.com/gin-gonic/gin/pull/2769) +* Some codes optimize [#2830](https://github.com/gin-gonic/gin/pull/2830) [#2834](https://github.com/gin-gonic/gin/pull/2834) [#2838](https://github.com/gin-gonic/gin/pull/2838) [#2837](https://github.com/gin-gonic/gin/pull/2837) [#2788](https://github.com/gin-gonic/gin/pull/2788) [#2848](https://github.com/gin-gonic/gin/pull/2848) [#2851](https://github.com/gin-gonic/gin/pull/2851) [#2701](https://github.com/gin-gonic/gin/pull/2701) +* Test(route): expose performRequest func [#3012](https://github.com/gin-gonic/gin/pull/3012) +* Support h2c with prior knowledge [#1398](https://github.com/gin-gonic/gin/pull/1398) +* Feat attachment filename support utf8 [#3071](https://github.com/gin-gonic/gin/pull/3071) +* Feat: add StaticFileFS [#2749](https://github.com/gin-gonic/gin/pull/2749) +* Feat(context): return GIN Context from Value method [#2825](https://github.com/gin-gonic/gin/pull/2825) +* Feat: automatically SetMode to TestMode when run go test [#3139](https://github.com/gin-gonic/gin/pull/3139) +* Add TOML bining for gin [#3081](https://github.com/gin-gonic/gin/pull/3081) +* IPv6 add default trusted proxies [#3033](https://github.com/gin-gonic/gin/pull/3033) + +### DOCS + +* Add note about nomsgpack tag to the readme [#2703](https://github.com/gin-gonic/gin/pull/2703) + + + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.8.0) + +--- + +## v1.7.7: Release v1.7.7 +**Published:** 2021-11-24 + +### BUGFIXES + +* Fixed X-Forwarded-For unsafe handling of CVE-2020-28483 [#2844](https://github.com/gin-gonic/gin/pull/2844), closed issue [#2862](https://github.com/gin-gonic/gin/issues/2862) +* Tree: updated the code logic for `latestNode` [#2897](https://github.com/gin-gonic/gin/pull/2897), closed issue [#2894](https://github.com/gin-gonic/gin/issues/2894) [#2878](https://github.com/gin-gonic/gin/issues/2878) +* Tree: fixed the misplacement of adding slashes [#2847](https://github.com/gin-gonic/gin/pull/2847), closed issue [#2843](https://github.com/gin-gonic/gin/issues/2843) +* Tree: fixed tsr with mixed static and wildcard paths [#2924](https://github.com/gin-gonic/gin/pull/2924), closed issue [#2918](https://github.com/gin-gonic/gin/issues/2918) + +### ENHANCEMENTS + +* TrustedProxies: make it backward-compatible [#2887](https://github.com/gin-gonic/gin/pull/2887), closed issue [#2819](https://github.com/gin-gonic/gin/issues/2819) +* TrustedPlatform: provide custom options for another CDN services [#2906](https://github.com/gin-gonic/gin/pull/2906) + +### DOCS + +* NoMethod: added usage annotation ([#2832](https://github.com/gin-gonic/gin/pull/2832#issuecomment-929954463)) + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.7.7) + +--- + +## 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](https://github.com/gin-gonic/gin/releases/tag/v1.7.6) + +--- + +## v1.7.4: bump new release to fix checksum mismatch +**Published:** 2021-08-15 + + + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.7.4) + +--- + +## v1.7.3: +**Published:** 2021-08-03 + +### BUGFIXES + +* fix level 1 router match [#2767](https://github.com/gin-gonic/gin/issues/2767), [#2796](https://github.com/gin-gonic/gin/issues/2796) + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.7.3) + +--- + +## v1.7.2: release v1.7.2 +**Published:** 2021-05-21 + +### BUGFIXES + +* Fix conflict between param and exact path [#2706](https://github.com/gin-gonic/gin/issues/2706). Close issue [#2682](https://github.com/gin-gonic/gin/issues/2682) [#2696](https://github.com/gin-gonic/gin/issues/2696). + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.7.2) + +--- + +## v1.7.1: +**Published:** 2021-04-08 + +### BUGFIXES + +* fix: data race with trustedCIDRs from [#2674](https://github.com/gin-gonic/gin/issues/2674)([#2675](https://github.com/gin-gonic/gin/pull/2675)) + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.7.1) + +--- + +## v1.7.0: Release v1.7.0 +**Published:** 2021-04-08 + +### BUGFIXES + +* fix compile error from [#2572](https://github.com/gin-gonic/gin/pull/2572) ([#2600](https://github.com/gin-gonic/gin/pull/2600)) +* fix: print headers without Authorization header on broken pipe ([#2528](https://github.com/gin-gonic/gin/pull/2528)) +* fix(tree): reassign fullpath when register new node ([#2366](https://github.com/gin-gonic/gin/pull/2366)) + +### ENHANCEMENTS + +* Support params and exact routes without creating conflicts ([#2663](https://github.com/gin-gonic/gin/pull/2663)) +* chore: improve render string performance ([#2365](https://github.com/gin-gonic/gin/pull/2365)) +* Sync route tree to httprouter latest code ([#2368](https://github.com/gin-gonic/gin/pull/2368)) +* chore: rename getQueryCache/getFormCache to initQueryCache/initFormCa ([#2375](https://github.com/gin-gonic/gin/pull/2375)) +* chore(performance): improve countParams ([#2378](https://github.com/gin-gonic/gin/pull/2378)) +* Remove some functions that have the same effect as the bytes package ([#2387](https://github.com/gin-gonic/gin/pull/2387)) +* update:SetMode function ([#2321](https://github.com/gin-gonic/gin/pull/2321)) +* remove a unused type SecureJSONPrefix ([#2391](https://github.com/gin-gonic/gin/pull/2391)) +* Add a redirect sample for POST method ([#2389](https://github.com/gin-gonic/gin/pull/2389)) +* Add CustomRecovery builtin middleware ([#2322](https://github.com/gin-gonic/gin/pull/2322)) +* binding: avoid 2038 problem on 32-bit architectures ([#2450](https://github.com/gin-gonic/gin/pull/2450)) +* Prevent panic in Context.GetQuery() when there is no Request ([#2412](https://github.com/gin-gonic/gin/pull/2412)) +* Add GetUint and GetUint64 method on gin.context ([#2487](https://github.com/gin-gonic/gin/pull/2487)) +* update content-disposition header to MIME-style ([#2512](https://github.com/gin-gonic/gin/pull/2512)) +* reduce allocs and improve the render `WriteString` ([#2508](https://github.com/gin-gonic/gin/pull/2508)) +* implement ".Unwrap() error" on Error type ([#2525](https://github.com/gin-gonic/gin/pull/2525)) ([#2526](https://github.com/gin-gonic/gin/pull/2526)) +* Allow bind with a map[string]string ([#2484](https://github.com/gin-gonic/gin/pull/2484)) +* chore: update tree ([#2371](https://github.com/gin-gonic/gin/pull/2371)) +* Support binding for slice/array obj [Rewrite] ([#2302](https://github.com/gin-gonic/gin/pull/2302)) +* basic auth: fix timing oracle ([#2609](https://github.com/gin-gonic/gin/pull/2609)) +* Add mixed param and non-param paths (port of httprouter[#329](https://github.com/gin-gonic/gin/pull/329)) ([#2663](https://github.com/gin-gonic/gin/pull/2663)) +* feat(engine): add trustedproxies and remoteIP ([#2632](https://github.com/gin-gonic/gin/pull/2632)) + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.7.0) + +--- + +## v1.6.3: Improve performance +**Published:** 2020-05-03 + +### ENHANCEMENTS + + * Improve performance: Change `*sync.RWMutex` to `sync.RWMutex` in context. [#2351](https://github.com/gin-gonic/gin/pull/2351) + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.6.3) + +--- + +## 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 + +* [@appleboy](https://github.com/appleboy) + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.6.2) + +--- + +## 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 + +* [@appleboy](https://github.com/appleboy) + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.6.1) + +--- + +## 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 + +* [@AcoNCodes](https://github.com/AcoNCodes) +* [@AstolfoKawaii](https://github.com/AstolfoKawaii) +* [@BradyBromley](https://github.com/BradyBromley) +* [@KaushikNeelichetty](https://github.com/KaushikNeelichetty) +* [@anio](https://github.com/anio) +* [@appleboy](https://github.com/appleboy) +* [@develerik](https://github.com/develerik) +* [@fifsky](https://github.com/fifsky) +* [@jbampton](https://github.com/jbampton) +* [@keob](https://github.com/keob) +* [@manute](https://github.com/manute) +* [@mosdeo](https://github.com/mosdeo) +* [@nikandfor](https://github.com/nikandfor) +* [@nsiregar](https://github.com/nsiregar) +* [@panjf2000](https://github.com/panjf2000) +* [@plsmaop](https://github.com/plsmaop) +* [@rujews](https://github.com/rujews) +* [@ryanjyoder](https://github.com/ryanjyoder) +* [@sapk](https://github.com/sapk) +* [@thinkerou](https://github.com/thinkerou) +* [@victorcoder](https://github.com/victorcoder) +* [@vkd](https://github.com/vkd) + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.6.0) + +--- + +## v1.5.0: +**Published:** 2019-11-28 + +## Feature + +- [NEW] Now you can parse the inline lowercase start structure [#1893](https://github.com/gin-gonic/gin/pull/1893) +- [NEW] **[Break-Backward]** Hold matched route full path in the Context [#1826](https://github.com/gin-gonic/gin/pull/1826) +- [NEW] Add context param query cache [#1450](https://github.com/gin-gonic/gin/pull/1450) +- [NEW] Add support of multipart multi files [#1949](https://github.com/gin-gonic/gin/pull/1949) +- [NEW] Support bind http header param [#1957](https://github.com/gin-gonic/gin/pull/1957) +- [NEW] Support bind unix time [#1980](https://github.com/gin-gonic/gin/pull/1980) +- [NEW] Support negative Content-Length in DataFromReader [#1981](https://github.com/gin-gonic/gin/pull/1981) +- [NEW] Add DisallowUnknownFields() in gin.Context.BindJSON() [#2028](https://github.com/gin-gonic/gin/pull/2028) +- [NEW] Use specific `net.Listener` with Engine.RunListener() [#2023](https://github.com/gin-gonic/gin/pull/2023) + +## Bug fix + +- [FIX] Use DefaultWriter and DefaultErrorWriter for debug messages [#1891](https://github.com/gin-gonic/gin/pull/1891) +- [FIX] Some code improvements [#1909](https://github.com/gin-gonic/gin/pull/1909) +- [FIX] Use encode replace json marshal increase json encoder speed [#1546](https://github.com/gin-gonic/gin/pull/1546) +- [FIX] Fix context.Params race condition on Copy() [#1841](https://github.com/gin-gonic/gin/pull/1841) +- [FIX] Improve GetQueryMap performance [#1918](https://github.com/gin-gonic/gin/pull/1918) +- [FIX] Improve get post data [#1920](https://github.com/gin-gonic/gin/pull/1920) +- [FIX] Use context instead of x/net/context [#1922](https://github.com/gin-gonic/gin/pull/1922) +- [FIX] Attempt to fix PostForm cache bug [#1931](https://github.com/gin-gonic/gin/pull/1931) +- [FIX] **[Break-Backward]** Drop support for go1.8 and go1.9 [#1933](https://github.com/gin-gonic/gin/pull/1933) +- [FIX] Bugfix for the FullPath feature [#1919](https://github.com/gin-gonic/gin/pull/1919) +- [FIX] Gin1.5 bytes.Buffer to strings.Builder [#1939](https://github.com/gin-gonic/gin/pull/1939) +- [FIX] Upgrade github.com/ugorji/go/codec [#1969](https://github.com/gin-gonic/gin/pull/1969) +- [FIX] Simplify code [#2004](https://github.com/gin-gonic/gin/pull/2004) +- [FIX] Identify terminal on a RISC-V architecture for auto-colored logs [#2019](https://github.com/gin-gonic/gin/pull/2019) +- [FIX] **[Break-Backward]** Context.JSONP() now expects a semicolon (;) at the end [#2007](https://github.com/gin-gonic/gin/pull/2007) +- [FIX] **[Break-Backward]** Upgrade validator version to v9 [#1015](https://github.com/gin-gonic/gin/pull/1015) +- [FIX] Fix some typo [#2079](https://github.com/gin-gonic/gin/pull/2079) [#2080](https://github.com/gin-gonic/gin/pull/2080) +- [FIX] Relocate binding body tests [#2086](https://github.com/gin-gonic/gin/pull/2086) +- [FIX] Use Writer in Context.Status [#1606](https://github.com/gin-gonic/gin/pull/1606) +- [FIX] `Engine.RunUnix()` now returns the error if it can't change the file mode [#2093](https://github.com/gin-gonic/gin/pull/2093) +- [FIX] `RouterGroup.StaticFS()` leaked files. Now it closes them. [#2118](https://github.com/gin-gonic/gin/pull/2118) +- [FIX] `Context.Request.FormFile` leaked file, now it closes it [#2114](https://github.com/gin-gonic/gin/pull/2114) +- [FIX] Ignore walking on `form:"-"` mapping [#1943](https://github.com/gin-gonic/gin/pull/1943) +- [REFACTOR] **[Break-Backward]** Use encode replace json marshal increase json encoder speed [#1546 ](https://github.com/gin-gonic/gin/pull/1546) + + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.5.0) + +--- + +## v1.4.0: +**Published:** 2019-05-08 + +## Feature + +- [NEW] Support for [Go Modules](https://github.com/golang/go/wiki/Modules) [#1569](https://github.com/gin-gonic/gin/pull/1569) +- [NEW] Refactor of form mapping multipart requesta [#1829](https://github.com/gin-gonic/gin/pull/1829) +- [NEW] Supporting file binding [#1264](https://github.com/gin-gonic/gin/pull/1264) +- [NEW] Add support for mapping arrays [#1797](https://github.com/gin-gonic/gin/pull/1797) +- [NEW] Make context.Keys available as LogFormatterParams [#1779](https://github.com/gin-gonic/gin/pull/1779) +- [NEW] Use internal/json for Marshal/Unmarshal [#1791](https://github.com/gin-gonic/gin/pull/1791) +- [NEW] Support mapping time.Duration [#1794](https://github.com/gin-gonic/gin/pull/1794) +- [NEW] Refactor form mappings [#1749](https://github.com/gin-gonic/gin/pull/1749) +- [NEW] Added flag to context.Stream indicates if client disconnected in middle of stream [#1252](https://github.com/gin-gonic/gin/pull/1252) +- [NEW] Extend context.File to allow for the content-dispositon attachments via a new method context.Attachment [#1260](https://github.com/gin-gonic/gin/pull/1260) +- [NEW] Add prefix from X-Forwarded-Prefix in redirectTrailingSlash [#1238](https://github.com/gin-gonic/gin/pull/1238) +- [NEW] Add context.HandlerNames() [#1729](https://github.com/gin-gonic/gin/pull/1729) +- [NEW] Add response size to LogFormatterParams [#1752](https://github.com/gin-gonic/gin/pull/1752) +- [NEW] Allow ignoring field on form mapping [#1733](https://github.com/gin-gonic/gin/pull/1733) +- [NEW] Add a function to force color in console output. [#1724](https://github.com/gin-gonic/gin/pull/1724) +- [NEW] Binding for URL Params [#1694](https://github.com/gin-gonic/gin/pull/1694) +- [NEW] Add LoggerWithFormatter method [#1677](https://github.com/gin-gonic/gin/pull/1677) +- [NEW] RunFd method to run http.Server through a file descriptor [#1609](https://github.com/gin-gonic/gin/pull/1609) +- [NEW] Yaml binding support [#1618](https://github.com/gin-gonic/gin/pull/1618) +- [NEW] Add PureJSON renderer [#694](https://github.com/gin-gonic/gin/pull/694) +- [NEW] Set default time format in form binding [#1487](https://github.com/gin-gonic/gin/pull/1487) +- [NEW] Upgrade dependency libraries [#1491](https://github.com/gin-gonic/gin/pull/1491) + +## Bug fix + +- [FIX] Truncate Latency precision in long running request [#1830](https://github.com/gin-gonic/gin/pull/1830) +- [FIX] IsTerm flag should not be affected by DisableConsoleColor method. [#1802](https://github.com/gin-gonic/gin/pull/1802) +- [FIX] Readme updates [#1793](https://github.com/gin-gonic/gin/pull/1793) [#1788](https://github.com/gin-gonic/gin/pull/1788) [1789](https://github.com/gin-gonic/gin/pull/1789) +- [FIX] StaticFS: Fixed Logging two log lines on 404. [#1805](https://github.com/gin-gonic/gin/pull/1805), [#1804](https://github.com/gin-gonic/gin/pull/1804) +- [FIX] Moved [examples](https://github.com/gin-gonic/examples) to stand alone Repo [#1775](https://github.com/gin-gonic/gin/pull/1775) +- [FIX] Support HTTP content negotiation wildcards [#1112](https://github.com/gin-gonic/gin/pull/1112) +- [FIX] Pass MaxMultipartMemory when FormFile is called [#1600](https://github.com/gin-gonic/gin/pull/1600) +- [FIX] LoadHTML* tests [#1559](https://github.com/gin-gonic/gin/pull/1559) +- [FIX] Removed use of sync.pool from HandleContext [#1565](https://github.com/gin-gonic/gin/pull/1565) +- [FIX] Format output log to os.Stderr [#1571](https://github.com/gin-gonic/gin/pull/1571) +- [FIX] Make logger use a yellow background and a darkgray text for legibility [#1570](https://github.com/gin-gonic/gin/pull/1570) +- [FIX] Remove sensitive request information from panic log. [#1370](https://github.com/gin-gonic/gin/pull/1370) +- [FIX] log.Println() does not print timestamp [#829](https://github.com/gin-gonic/gin/pull/829) [#1560](https://github.com/gin-gonic/gin/pull/1560) +- [FIX] Add missing copyright and update if/else [#1497](https://github.com/gin-gonic/gin/pull/1497) +- [FIX] Update msgpack usage [#1498](https://github.com/gin-gonic/gin/pull/1498) +- [FIX] Use protobuf on render [#1496](https://github.com/gin-gonic/gin/pull/1496) +- [FIX] Add support for Protobuf format response [#1479](https://github.com/gin-gonic/gin/pull/1479) +- [FIX] Add BindXML and ShouldBindXML [#1485](https://github.com/gin-gonic/gin/pull/1485) +- [FIX] CI testing updates [#1671](https://github.com/gin-gonic/gin/pull/1671) [#1670](https://github.com/gin-gonic/gin/pull/1670) [#1682](https://github.com/gin-gonic/gin/pull/1682) [#1669](https://github.com/gin-gonic/gin/pull/1669) +- [FIX] StaticFS(): Send 404 when path does not exist [#1663](https://github.com/gin-gonic/gin/pull/1663) +- [FIX] Handle nil body for JSON binding [#1638](https://github.com/gin-gonic/gin/pull/1638) +- [FIX] Support bind uri param [#1612](https://github.com/gin-gonic/gin/pull/1612) +- [FIX] recovery: fix issue with syscall import on google app engine [#1640](https://github.com/gin-gonic/gin/pull/1640) +- [FIX] Make sure the debug log contains line breaks [#1650](https://github.com/gin-gonic/gin/pull/1650) +- [FIX] Panic stack trace being printed during recovery of broken pipe [#1089](https://github.com/gin-gonic/gin/pull/1089) [#1259](https://github.com/gin-gonic/gin/pull/1259) +- [FIX] Context.Next() - recheck len of handlers on every iteration. [#1745](https://github.com/gin-gonic/gin/pull/1745) +- [FIX] Fix all errcheck warnings [#1739](https://github.com/gin-gonic/gin/pull/1739) [#1653](https://github.com/gin-gonic/gin/pull/1653) +- [FIX] Change color methods to public in the defaultLogger. [#1771](https://github.com/gin-gonic/gin/pull/1771) +- [FIX] Update writeHeaders method to use http.Header.Set [#1722](https://github.com/gin-gonic/gin/pull/1722) +- [FIX] context.Copy() race condition [#1020](https://github.com/gin-gonic/gin/pull/1020) + + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.4.0) + +--- + +## v1.3.0: v1.3.0 +**Published:** 2018-08-14 + +# CHANGELOG + +## Gin 1.3.0 + +- [NEW] Add [`func (*Context) QueryMap`](https://godoc.org/github.com/gin-gonic/gin#Context.QueryMap), [`func (*Context) GetQueryMap`](https://godoc.org/github.com/gin-gonic/gin#Context.GetQueryMap), [`func (*Context) PostFormMap`](https://godoc.org/github.com/gin-gonic/gin#Context.PostFormMap) and [`func (*Context) GetPostFormMap`](https://godoc.org/github.com/gin-gonic/gin#Context.GetPostFormMap) to support `type map[string]string` as query string or form parameters, see [#1383](https://github.com/gin-gonic/gin/pull/1383) +- [NEW] Add [`func (*Context) AsciiJSON`](https://godoc.org/github.com/gin-gonic/gin#Context.AsciiJSON), see [#1358](https://github.com/gin-gonic/gin/pull/1358) +- [NEW] Add `Pusher()` in [`type ResponseWriter`](https://godoc.org/github.com/gin-gonic/gin#ResponseWriter) for supporting http2 push, see [#1273](https://github.com/gin-gonic/gin/pull/1273) +- [NEW] Add [`func (*Context) DataFromReader`](https://godoc.org/github.com/gin-gonic/gin#Context.DataFromReader) for serving dynamic data, see [#1304](https://github.com/gin-gonic/gin/pull/1304) +- [NEW] Add [`func (*Context) ShouldBindBodyWith`](https://godoc.org/github.com/gin-gonic/gin#Context.ShouldBindBodyWith) allowing to call binding multiple times, see [#1341](https://github.com/gin-gonic/gin/pull/1341) +- [NEW] Support pointers in form binding, see [#1336](https://github.com/gin-gonic/gin/pull/1336) +- [NEW] Add [`func (*Context) JSONP`](https://godoc.org/github.com/gin-gonic/gin#Context.JSONP), see [#1333](https://github.com/gin-gonic/gin/pull/1333) +- [NEW] Support default value in form binding, see [#1138](https://github.com/gin-gonic/gin/pull/1138) +- [NEW] Expose validator engine in [`type StructValidator`](https://godoc.org/github.com/gin-gonic/gin/binding#StructValidator), see [#1277](https://github.com/gin-gonic/gin/pull/1277) +- [NEW] Add [`func (*Context) ShouldBind`](https://godoc.org/github.com/gin-gonic/gin#Context.ShouldBind), [`func (*Context) ShouldBindQuery`](https://godoc.org/github.com/gin-gonic/gin#Context.ShouldBindQuery) and [`func (*Context) ShouldBindJSON`](https://godoc.org/github.com/gin-gonic/gin#Context.ShouldBindJSON), see [#1047](https://github.com/gin-gonic/gin/pull/1047) +- [NEW] Add support for `time.Time` location in form binding, see [#1117](https://github.com/gin-gonic/gin/pull/1117) +- [NEW] Add [`func (*Context) BindQuery`](https://godoc.org/github.com/gin-gonic/gin#Context.BindQuery), see [#1029](https://github.com/gin-gonic/gin/pull/1029) +- [NEW] Make [jsonite](https://github.com/json-iterator/go) optional with build tags, see [#1026](https://github.com/gin-gonic/gin/pull/1026) +- [NEW] Show query string in logger, see [#999](https://github.com/gin-gonic/gin/pull/999) +- [NEW] Add [`func (*Context) SecureJSON`](https://godoc.org/github.com/gin-gonic/gin#Context.SecureJSON), see [#987](https://github.com/gin-gonic/gin/pull/987) and [#993](https://github.com/gin-gonic/gin/pull/993) +- [DEPRECATE] `func (*Context) GetCookie` for [`func (*Context) Cookie`](https://godoc.org/github.com/gin-gonic/gin#Context.Cookie) +- [FIX] Don't display color tags if [`func DisableConsoleColor`](https://godoc.org/github.com/gin-gonic/gin#DisableConsoleColor) called, see [#1072](https://github.com/gin-gonic/gin/pull/1072) +- [FIX] Gin Mode `""` when calling [`func Mode`](https://godoc.org/github.com/gin-gonic/gin#Mode) now returns `const DebugMode`, see [#1250](https://github.com/gin-gonic/gin/pull/1250) +- [FIX] `Flush()` now doesn't overwrite `responseWriter` status code, see [#1460](https://github.com/gin-gonic/gin/pull/1460) + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.3.0) + +--- + +## 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](https://github.com/gin-gonic/gin/releases/tag/v1.2) + +--- + +## v1.1.4: Release v1.1.4 +**Published:** 2016-12-05 + +- https://github.com/gin-gonic/gin/pull/754 Support google appengine for IsTerminal func. + + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.1.4) + +--- + +## v1.1.3: Release v1.1.3 +**Published:** 2016-12-04 + +- Reverted Logger: skip ANSI color commands PR https://github.com/gin-gonic/gin/pull/744 https://github.com/gin-gonic/gin/pull/753 + + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.1.3) + +--- + +## 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 :wink: + + +[View on GitHub](https://github.com/gin-gonic/gin/releases/tag/v1.1) + +--- + +## 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](https://github.com/gin-gonic/gin/releases/tag/v1.0-rc.2) + +--- + +## 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](https://github.com/gin-gonic/gin/releases/tag/v1.0rc1) + +--- +