Bo-Yi Wu
234a6d4c00
fix(response): refine hijack behavior for response lifecycle ( #4373 )
...
* feat: refine hijack behavior for response lifecycle and add tests
- Clarify the error message for attempted hijack after response body data is written
- Modify hijack behavior: allow hijacking after headers are written (for better websocket compatibility), but block hijacking after any body data is sent
- Add comprehensive tests to validate allowed hijack after header write and disallowed hijack after body write
fix https://github.com/gin-gonic/gin/issues/4372
Signed-off-by: appleboy <appleboy.tw@gmail.com>
* test: use require for immediate test failure on errors
- Replace assert with require for error checks to ensure test failures immediately halt execution
Signed-off-by: appleboy <appleboy.tw@gmail.com>
* Update response_writer.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Signed-off-by: appleboy <appleboy.tw@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-26 08:13:39 +08:00
dependabot[bot]
df2753778e
chore(deps): bump github.com/quic-go/quic-go from 0.54.0 to 0.54.1 ( #4379 )
...
Bumps [github.com/quic-go/quic-go](https://github.com/quic-go/quic-go ) from 0.54.0 to 0.54.1.
- [Release notes](https://github.com/quic-go/quic-go/releases )
- [Commits](https://github.com/quic-go/quic-go/compare/v0.54.0...v0.54.1 )
---
updated-dependencies:
- dependency-name: github.com/quic-go/quic-go
dependency-version: 0.54.1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-26 08:10:02 +08:00
dependabot[bot]
048f6fb884
chore(deps): bump the actions group with 2 updates ( #4368 )
...
Bumps the actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout ) and [codecov/codecov-action](https://github.com/codecov/codecov-action ).
Updates `actions/checkout` from 4 to 5
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v4...v5 )
Updates `codecov/codecov-action` from 4 to 5
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: '5'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions
- dependency-name: codecov/codecov-action
dependency-version: '5'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-21 21:18:25 +08:00
Bo-Yi Wu
61b67de522
ci(bot): increase frequency and group updates for dependencies ( #4367 )
...
- Change the update schedule for both gomod and GitHub Actions dependencies from weekly to daily
- Add grouping for GitHub Actions updates using a catch-all pattern
Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-09-21 21:11:11 +08:00
appleboy
f3a5e78719
docs: update feature documentation instructions for broken doc link
...
- Fix a broken link to docs/doc.md in the feature documentation instructions
Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-09-21 17:48:39 +08:00
cui
414de60574
refactor(context): using maps.Clone ( #4333 )
...
ref: https://go-review.googlesource.com/c/go/+/471400
2025-09-21 17:46:17 +08:00
Name
59e9d4a794
refactor(ginS): use sync.OnceValue to simplify engine function ( #4314 )
...
Co-authored-by: 1911860538 <alxps1911@gmail.com>
2025-09-21 17:41:54 +08:00
Bo-Yi Wu
6a1d1218c3
docs: revamp contributing guidelines with comprehensive instructions ( #4365 )
...
- Rewrite and expand the contributing guidelines for clarity and thoroughness
- Add distinct sections for Issues and Pull Requests with step-by-step instructions
- Include links to documentation, user guides, and the discussions forum
- Provide advice for reporting bugs and making feature requests
- Specify requirements for pull requests, including branch, commit count, and test coverage
- Clarify documentation expectations for new features and reference the pull request checklist
- Add guidance for security-related bug reports and communication language
Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-09-21 17:39:33 +08:00
Bo-Yi Wu
7925414704
docs: revamp GitHub contribution and support templates ( #4364 )
...
- Replace the old issue template with new, structured YAML templates for bug reports and feature requests
- Add a configuration file that directs users to relevant documentation and support links
- Update the pull request template to use a checklist format and clarify documentation requirements
Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-09-21 12:48:19 +08:00
Bo-Yi Wu
1bbbec0baf
docs: announce Gin 1.11.0 release with blog link ( #4363 )
...
- Add a new section announcing Gin 1.11.0 and link to its release blog post
Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-09-21 10:50:09 +08:00
Bo-Yi Wu
4dd00f81b1
docs(readme): revamp and expand documentation for clarity and completeness ( #4362 )
...
- Update contributing header to single hash style
- Remove deprecated badge and improve project summary wording
- Reorganize and clarify feature descriptions and benefits
- Restructure getting started and installation instructions for clarity
- Expand and annotate the first example application walkthrough
- Detail the steps for running the sample application and expected output
- Improve guidance on learning resources and example projects
- Enhance API reference, documentation links, and tutorial references
- Add a clear performance benchmarks section comparing Gin to other frameworks
- Expand middleware section with ecosystem highlights and usage details
- Create a production usage section listing notable projects using Gin
- Revamp contribution section with clearer procedure and encouragement for new contributors
Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-09-20 20:58:46 +08:00
Bo-Yi Wu
6ad6205e9c
docs(changelog): upgrade Gin to v1.11.0 and add release notes ( #4361 )
...
- Add release notes for Gin v1.11.0, detailing new features, enhancements, bug fixes, CI/build improvements, dependency updates, and documentation changes
- Update Gin framework version to v1.11.0
ref: https://github.com/gin-gonic/gin/issues/4325
Signed-off-by: appleboy <appleboy.tw@gmail.com>
v1.11.0
2025-09-20 19:38:42 +08:00
Bo-Yi Wu
7858527c8c
docs(changelog): update release notes for Gin v1.10.1 ( #4360 )
...
- Add release notes for Gin v1.10.1, including new features, enhancements, and build process updates
Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-09-20 19:32:43 +08:00
Bo-Yi Wu
cb000f570c
ci: integrate Trivy vulnerability scanning into CI workflow ( #4359 )
...
- Add a GitHub Actions job for vulnerability scanning using Trivy
- Configure Trivy to scan the repository for vulnerabilities of severity critical, high, and medium
- Ensure the workflow fails if vulnerabilities are found
Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-09-20 19:24:57 +08:00
Flc゛
2119046230
ci: support Go 1.25 ( #4341 )
...
- Update GitHub Actions workflow to include Go 1.25 in the test matrix
- This change expands the range of Go versions tested for the project
Signed-off-by: Flc <four_leaf_clover@foxmail.com>
2025-09-19 09:44:22 +08:00
Flc゛
da372fc778
build(deps): upgrade github.com/bytedance/sonic from v1.13.2 to v1.14.0 ( #4342 )
...
* build(deps): upgrade github.com/bytedance/sonic from v1.13.2 to v1.14.0
Signed-off-by: Flc <four_leaf_clover@foxmail.com>
* build(deps): upgrade github.com/bytedance/sonic from v1.13.2 to v1.14.0
Signed-off-by: Flc <four_leaf_clover@foxmail.com>
* test: update expected status code for request too large test
Signed-off-by: Flc <four_leaf_clover@foxmail.com>
---------
Signed-off-by: Flc <four_leaf_clover@foxmail.com>
2025-09-19 08:40:33 +08:00
Name
e198f6e859
refactor(render): remove headers parameter from writeHeader ( #4353 )
...
Co-authored-by: 1911860538 <alxps1911@gmail.com>
2025-09-19 08:39:17 +08:00
dependabot[bot]
cca98d2d26
chore(deps): bump google.golang.org/protobuf from 1.36.8 to 1.36.9 ( #4356 )
...
Bumps google.golang.org/protobuf from 1.36.8 to 1.36.9.
---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
dependency-version: 1.36.9
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-19 08:35:54 +08:00
Name
9b1e3533e2
refactor(tree): replace string(/) with "/" in node.insertChild ( #4354 )
...
Co-authored-by: 1911860538 <alxps1911@gmail.com>
2025-09-19 08:35:34 +08:00
Name
f9bd00a6b7
perf(context): optimize getMapFromFormData performance ( #4339 )
...
Co-authored-by: 1911860538 <alxps1911@gmail.com>
2025-09-14 07:29:11 +08:00
dependabot[bot]
28172fa682
chore(deps): bump google.golang.org/protobuf from 1.36.6 to 1.36.8 ( #4346 )
...
Bumps google.golang.org/protobuf from 1.36.6 to 1.36.8.
---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
dependency-version: 1.36.8
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-14 07:26:29 +08:00
dependabot[bot]
46150257b3
chore(deps): bump github.com/stretchr/testify from 1.10.0 to 1.11.1 ( #4347 )
...
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify ) from 1.10.0 to 1.11.1.
- [Release notes](https://github.com/stretchr/testify/releases )
- [Commits](https://github.com/stretchr/testify/compare/v1.10.0...v1.11.1 )
---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
dependency-version: 1.11.1
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-14 07:26:06 +08:00
dependabot[bot]
e7693e67c2
chore(deps): bump actions/setup-go from 5 to 6 ( #4351 )
...
Bumps [actions/setup-go](https://github.com/actions/setup-go ) from 5 to 6.
- [Release notes](https://github.com/actions/setup-go/releases )
- [Commits](https://github.com/actions/setup-go/compare/v5...v6 )
---
updated-dependencies:
- dependency-name: actions/setup-go
dependency-version: '6'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-14 07:25:36 +08:00
dependabot[bot]
077a2f39c8
chore(deps): bump github.com/quic-go/quic-go from 0.53.0 to 0.54.0 ( #4328 )
...
Bumps [github.com/quic-go/quic-go](https://github.com/quic-go/quic-go ) from 0.53.0 to 0.54.0.
- [Release notes](https://github.com/quic-go/quic-go/releases )
- [Commits](https://github.com/quic-go/quic-go/compare/v0.53.0...v0.54.0 )
---
updated-dependencies:
- dependency-name: github.com/quic-go/quic-go
dependency-version: 0.54.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-06 22:16:53 +08:00
Name
45b805f6d5
perf(recovery): optimize the log output of CustomRecoveryWithWriter ( #4258 )
...
Co-authored-by: 1911860538 <alxps1911@gmail.com>
2025-08-02 12:30:14 +08:00
Varus Hsu
17d0b553ea
chore(render): do not export tomlContentType anymore ( #4319 )
2025-08-02 12:27:59 +08:00
諏訪原慶斗
42f93283cf
docs(test): improved GoDoc in test_helpers.go ( #4270 )
2025-08-02 12:23:20 +08:00
諏訪原慶斗
32065bbd42
chore(response): prevention of Hijack() runtime panics ( #4295 )
...
* Prevention of Hijack() runtime panics
* added test of Hijack()
* fix review
* fix lint error
* added check assertion of Wrrten() condition before calling Hijack()
2025-08-02 12:16:58 +08:00
Denny Septian Panggabean
b987b6206f
build: make automatically update package in golang ( #4311 )
2025-07-26 21:02:59 +08:00
Leon cap
dab5944a7b
test(context): add comprehensive unit tests for Context.File()
method ( #4307 )
...
* test: add comprehensive unit tests for Context.File() method
- Add TestContextFile with multiple test scenarios in context_test.go
- Add simplified tests in context_file_test.go
- Cover file serving, 404 handling, directory access, HEAD requests, and Range requests
- All tests pass successfully
* fix: resolve gci formatting issues in test files
* fix: correct test file paths and add test file to gin directory
* move test_file.txt to testdata directory as suggested by maintainer
* fix: update test file paths to use testdata directory
2025-07-22 21:38:32 +08:00
Name
9708475b3b
docs(context): fix AbortWithStatusPureJSON comment typo ( #4310 )
...
Co-authored-by: 1911860538 <alxps1911@gmail.com>
2025-07-22 21:36:47 +08:00
Name
e4c2a27624
refactor(context): remove unused Context dependency in get method ( #4304 )
...
Co-authored-by: 1911860538 <alxps1911@gmail.com>
2025-07-22 11:19:08 +08:00
chenhuiluo
a4ac275e07
test(route): add some test for routergroup ( #4291 )
...
Co-authored-by: chenhuiluo <luochenhui@butterfly.tech>
2025-07-19 15:49:41 +08:00
dependabot[bot]
ae5be7fcb7
chore(deps): bump golang.org/x/net from 0.41.0 to 0.42.0 ( #4297 )
...
Bumps [golang.org/x/net](https://github.com/golang/net ) from 0.41.0 to 0.42.0.
- [Commits](https://github.com/golang/net/compare/v0.41.0...v0.42.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/net
dependency-version: 0.42.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-19 15:08:22 +08:00
maskpp
57ec9e6036
chore(mode): remove impossible case (empty value for mode) ( #4303 )
2025-07-19 15:07:44 +08:00
Leon cap
ad4f436ae9
docs: correct article usage in comments ( #4301 )
...
- Fix 'an url' to 'a URL' in logger.go comment
- Fix 'an form' to 'a form' in binding/form_mapping.go comment
- Improve grammar consistency in code documentation
2025-07-19 14:58:12 +08:00
諏訪原慶斗
5826722a87
fix: version number discrepancy ( #4299 )
2025-07-17 19:51:40 +08:00
諏訪原慶斗
bdc1ad7987
docs: added comment in doc.go ( #4274 )
2025-07-13 09:43:32 +08:00
dependabot[bot]
545fd74379
chore(deps): bump github.com/go-playground/validator/v10 ( #4289 )
...
Bumps [github.com/go-playground/validator/v10](https://github.com/go-playground/validator ) from 10.26.0 to 10.27.0.
- [Release notes](https://github.com/go-playground/validator/releases )
- [Commits](https://github.com/go-playground/validator/compare/v10.26.0...v10.27.0 )
---
updated-dependencies:
- dependency-name: github.com/go-playground/validator/v10
dependency-version: 10.27.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-13 09:41:58 +08:00
dependabot[bot]
a6287825c9
chore(deps): bump github.com/ugorji/go/codec from 1.2.12 to 1.3.0 ( #4268 )
...
Bumps [github.com/ugorji/go/codec](https://github.com/ugorji/go ) from 1.2.12 to 1.3.0.
- [Release notes](https://github.com/ugorji/go/releases )
- [Commits](https://github.com/ugorji/go/compare/v1.2.12...codec/v1.3.0 )
---
updated-dependencies:
- dependency-name: github.com/ugorji/go/codec
dependency-version: 1.3.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-13 09:41:31 +08:00
Denny Septian Panggabean
dbd8a25150
feat: added AbortWithStatusPureJSON()
in Context
( #4290 )
...
* feat: added `AbortWithStatusPureJSON()` in context
* Update context_test.go
2025-07-13 09:40:35 +08:00
dependabot[bot]
b7d6308bcc
chore(deps): bump github.com/quic-go/quic-go from 0.52.0 to 0.53.0 ( #4281 )
...
Bumps [github.com/quic-go/quic-go](https://github.com/quic-go/quic-go ) from 0.52.0 to 0.53.0.
- [Release notes](https://github.com/quic-go/quic-go/releases )
- [Commits](https://github.com/quic-go/quic-go/compare/v0.52.0...v0.53.0 )
---
updated-dependencies:
- dependency-name: github.com/quic-go/quic-go
dependency-version: 0.53.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-13 09:27:07 +08:00
Denny Septian Panggabean
4bdcd9d0f1
docs: added available ID
documentation ( #4287 )
2025-07-13 09:26:26 +08:00
Denny Septian Panggabean
76dd08d512
docs: wrong badge workflow in README.md ( #4286 )
2025-07-07 17:20:47 +08:00
M. Ilham Surya Pratama
cf4775283e
chroe: migrate yaml package to github.com/goccy/go-yaml ( #4272 )
2025-06-21 12:38:28 +08:00
Tim
688a429d19
feat: support custom json codec at runtime ( #3391 )
...
* refactor(json): export json codec
* feat(json): support custom json codec at runtime
* chore(copyright): update copyright to 2025 gin core team
* docs(gin): add custom json codec examples in doc file
2025-06-16 23:16:36 +08:00
dependabot[bot]
0a864884de
chore(deps): bump golang.org/x/net from 0.40.0 to 0.41.0 ( #4262 )
...
Bumps [golang.org/x/net](https://github.com/golang/net ) from 0.40.0 to 0.41.0.
- [Commits](https://github.com/golang/net/compare/v0.40.0...v0.41.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/net
dependency-version: 0.41.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-16 23:01:46 +08:00
Victor Dusart
dd33ff7938
fix(docs): missing go markdown codeblock ( #4266 )
2025-06-16 22:59:53 +08:00
Name
77d70e5858
refactor(internal/bytesconv): replace rand usage with crypto/rand and rand.Int63 ( #4259 )
...
Co-authored-by: huangzw <huangzw@2345.com>
2025-06-09 21:05:34 +08:00
eqsdxr
a9c5b36578
docs: small changes ( #4261 )
2025-06-09 21:04:23 +08:00