flc1125
3c15fae9f2
build(deps): downgrade golang.org/x/mod and golang.org/x/tools
...
- Downgrade golang.org/x/mod from v0.24.0 to v0.18.0
- Downgrade golang.org/x/tools from v0.33.0 to v.22.0
These changes are made to address compatibility issues with the current project setup.
Signed-off-by: flc1125 <four_leaf_clover@foxmail.com>
2025-05-22 19:42:17 +08:00
flc1125
e2f347ba47
build(deps): remove golang.org/x/lint
...
- Remove golang.org/x/lint package from go.mod
- Update related dependencies in go.sum
Signed-off-by: flc1125 <four_leaf_clover@foxmail.com>
2025-05-22 19:40:35 +08:00
flc1125
31da74b8ec
Merge branch 'upgrade-golangci-lint' of github.com:flc1125/gin; branch 'master' of github.com:gin-gonic/gin into upgrade-golangci-lint
2025-05-22 19:39:35 +08:00
Bo-Yi Wu
8fb3136664
Revert "fix(time): binding time with empty value ( #4103 )" ( #4245 )
...
This reverts commit 674522db91d637d179c16c372d87756ea26fa089.
2025-05-22 19:20:04 +08:00
Flc
21df7395ca
test: ignore testifylint and gofumpt lints in specific test cases
...
Signed-off-by: Flc <four_leaf_clover@foxmail.com>
2025-05-21 23:45:28 +08:00
Flc
4092436c56
ci(golangci): add gofumpt linter and fix related issues- Added gofumpt linter to .golangci.yml
...
Signed-off-by: Flc <four_leaf_clover@foxmail.com>
2025-05-21 23:43:11 +08:00
Flc
82549da4b9
ci: downgrade golangci-lint to v2.1.6
...
Signed-off-by: Flc <four_leaf_clover@foxmail.com>
2025-05-21 23:36:35 +08:00
Flc
f02149ccb4
ci(github): update golangci-lint-action to v8 and lint version to v2.3.4
...
Signed-off-by: Flc <four_leaf_clover@foxmail.com>
2025-05-21 23:29:54 +08:00
Flc
21cfba8bba
ci: update golangci-lint configuration and lint settings
...
- Update golangci-lint to version 2
- Enable new linters and adjust existing ones
- Update lint settings across multiple test files
- Remove unused struct and variable checks
- Add new lint exclusions for generated code and specific directories
Signed-off-by: Flc <four_leaf_clover@foxmail.com>
2025-05-21 23:24:27 +08:00
Kashiwa
674522db91
fix(time): binding time with empty value ( #4103 )
...
* fix: binding time with empty value (#4098 )
* refact: simplify null-to-zero filling logic
* test: add test for zeroUnixNanoTime
2025-05-21 19:21:46 +08:00
Andreas Deininger
8f7c340577
context_test.go: fix useless asserts ( #4115 )
2025-05-21 19:16:29 +08:00
yangquanshi
d00e6a5695
chore: fix some function names in comment ( #4131 )
...
Signed-off-by: yangquanshi <yangquan@52it.net>
2025-05-21 19:14:28 +08:00
Liu Ziming
19f5a13fb4
docs(readme): add gin-gonic/contrib ( #4134 )
2025-05-21 08:25:00 +08:00
NARITA
fb09c825e8
feat(context): add SetCookieData ( #4240 )
...
* feat(context): add SetCookieStruct (#4215 )# This is a combination of 2 commits.
feat(context): add SetCookieStruct (#4215 )
feat(context): add SetCookieStruct (#4215 )
* feat(context): add SetCookieStruct (#4215 )
* feat(context): fix SetCookieStruct→SetCookieData (gin-gonic#4215)
* fix(context): respect caller-specified SameSite value in SetCookieData
2025-05-21 08:20:44 +08:00
Name
3d8e288c64
perf(all): use strings.Cut to replace strings.SplitN ( #4239 )
...
Co-authored-by: 1911860538 <alxps1911@gmail.com>
2025-05-20 22:58:34 +08:00
Salim Absi
2e2bd1f408
test(internal/fs): fix test function name ( #4235 )
2025-05-20 18:29:39 +08:00
Siddhesh Mhadnak
da67cc1b98
test: fix lint failures ( #4244 )
2025-05-20 18:16:21 +08:00
dependabot[bot]
ef68fa032c
chore(deps): bump golang.org/x/net from 0.38.0 to 0.40.0 ( #4229 )
...
Bumps [golang.org/x/net](https://github.com/golang/net ) from 0.38.0 to 0.40.0.
- [Commits](https://github.com/golang/net/compare/v0.38.0...v0.40.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/net
dependency-version: 0.40.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-05-11 22:42:01 +08:00
Orkhan Alikhanov
b38c59de7f
fix(errors): change Unwrap method receiver to value type ( #4232 )
2025-05-11 22:38:33 +08:00
dependabot[bot]
cf32d2dcf8
chore(deps): bump github.com/pelletier/go-toml/v2 from 2.2.2 to 2.2.4 ( #4212 )
...
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml ) from 2.2.2 to 2.2.4.
- [Release notes](https://github.com/pelletier/go-toml/releases )
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml )
- [Commits](https://github.com/pelletier/go-toml/compare/v2.2.2...v2.2.4 )
---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
dependency-version: 2.2.4
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-05-11 22:35:03 +08:00
dependabot[bot]
4714c2a9a3
chore(deps): bump google.golang.org/protobuf from 1.34.1 to 1.36.6 ( #4198 )
...
Bumps google.golang.org/protobuf from 1.34.1 to 1.36.6.
---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
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-05-11 22:34:39 +08:00
Yash
7a1b655074
fix: sonic on arm64 ( #4234 )
2025-05-11 22:34:09 +08:00
Name
67c9d4ee11
refactor: replace magic number 128 with unicode.MaxASCII in AsciiJSON Render ( #4224 )
...
Co-authored-by: huangzw <huangzw@2345.com>
2025-04-21 22:05:28 +08:00
dependabot[bot]
bb82473103
chore(deps): bump github.com/quic-go/quic-go from 0.48.2 to 0.50.1 ( #4197 )
...
Bumps [github.com/quic-go/quic-go](https://github.com/quic-go/quic-go ) from 0.48.2 to 0.50.1.
- [Release notes](https://github.com/quic-go/quic-go/releases )
- [Changelog](https://github.com/quic-go/quic-go/blob/master/Changelog.md )
- [Commits](https://github.com/quic-go/quic-go/compare/v0.48.2...v0.50.1 )
---
updated-dependencies:
- dependency-name: github.com/quic-go/quic-go
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-04-21 00:15:51 +08:00
dependabot[bot]
255af882db
chore(deps): bump github.com/go-playground/validator/v10 ( #4208 )
...
Bumps [github.com/go-playground/validator/v10](https://github.com/go-playground/validator ) from 10.22.1 to 10.26.0.
- [Release notes](https://github.com/go-playground/validator/releases )
- [Commits](https://github.com/go-playground/validator/compare/v10.22.1...v10.26.0 )
---
updated-dependencies:
- dependency-name: github.com/go-playground/validator/v10
dependency-version: 10.26.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-04-21 00:14:45 +08:00
sunshineplan
71496abe68
feat(fs): Implement loading HTML from http.FileSystem ( #4053 )
...
* Implement loading HTML from http.FileSystem
* Add OnlyHTMLFS test
* Move OnlyHTMLFS to internal and add test
2025-04-21 00:11:16 +08:00
Name
0eb99493c2
perf: optimize AsciiJSON.Render method by using fmt.Appendf and reusing temp buffer ( #4175 )
...
per: use bytesconv.BytesToString(ret) instead of string(str)
Co-authored-by: 1911860538 <alxps1911@gmail.com>
2025-04-21 00:05:34 +08:00
dependabot[bot]
afa0c31d97
chore(deps): bump github.com/gin-contrib/sse from 0.1.0 to 1.1.0 ( #4216 )
...
Bumps [github.com/gin-contrib/sse](https://github.com/gin-contrib/sse ) from 0.1.0 to 1.1.0.
- [Release notes](https://github.com/gin-contrib/sse/releases )
- [Changelog](https://github.com/gin-contrib/sse/blob/master/.goreleaser.yaml )
- [Commits](https://github.com/gin-contrib/sse/compare/v0.1.0...v1.1.0 )
---
updated-dependencies:
- dependency-name: github.com/gin-contrib/sse
dependency-version: 1.1.0
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-04-21 00:02:02 +08:00
dependabot[bot]
56fccc39ec
chore(deps): bump golang.org/x/net from 0.37.0 to 0.38.0 ( #4221 )
...
Bumps [golang.org/x/net](https://github.com/golang/net ) from 0.37.0 to 0.38.0.
- [Commits](https://github.com/golang/net/compare/v0.37.0...v0.38.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/net
dependency-version: 0.38.0
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-21 00:01:35 +08:00
eduardo-ax
3319038418
fix(readme): fix broken link to English documentation ( #4222 )
...
Co-authored-by: Eduardo Alexandre <eduardoalexandree.ps>
2025-04-21 00:01:03 +08:00
NezhaFan
49e9137c68
docs: fix comment ( #4205 )
...
Co-authored-by: voyager1 <voyager1@voyager1deMacBook-Pro.local>
2025-04-12 00:00:59 +08:00
Adlai Bridson-Boyczuk
1b53a47790
docs: Fixing English grammar mistakes and awkward sentence structure in doc/doc.md ( #4207 )
...
* docs: Fixing grammar mistakes and awkward sentences, such as modeling
binding section
* Update doc.md
Missed grammar mistake
2025-04-11 23:59:03 +08:00
Andrey Bolonin
3afff295a2
docs: add Upd language list ( #4211 )
...
* Upd language list
* Update url
2025-04-11 23:58:02 +08:00
bound2
8763f33c65
fix: prevent middleware re-entry issue in HandleContext ( #3987 )
2025-03-20 23:40:41 +08:00
revevide
e737e3e267
fix(binding): prevent duplicate decoding and add validation in decodeToml ( #4193 )
2025-03-20 23:35:49 +08:00
takanuva15
4ccfa7c275
feat(binding): add support for unixMilli and unixMicro ( #4190 )
2025-03-20 23:33:10 +08:00
Bo-Yi Wu
90cf460269
chore: update Go versions and dependencies for improved compatibility ( #4187 )
...
* chore: update Go versions and dependencies for improved compatibility
- Update Go versions in workflow file to `1.23` and `1.24`
- Enhance test tags in workflow with specific linker flags
- Remove the conditional formatting step for Go `1.22.x` in workflow
- Remove `goimports` settings from `.golangci.yml`
- Update `go.mod` to use Go `1.23.0`
- Upgrade `github.com/bytedance/sonic` from `v1.11.6` to `v1.13.1`
- Update indirect dependencies `sonic/loader` to `v0.2.4` and `base64x` to `v0.1.5` in `go.mod`
Signed-off-by: appleboy <appleboy.tw@gmail.com>
* chore: update project for Go 1.23 compatibility and documentation fixes
- Update Go version requirement from 1.22 to 1.23 in README.md
- Remove superfluous `$` from example command in README.md
- Update warning message to reflect new Go version requirement in debug.go
- Update test assertion to reflect new Go version requirement in debug_test.go
Signed-off-by: appleboy <appleboy.tw@gmail.com>
---------
Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-03-20 10:13:47 +08:00
Name
ebe5e2a6bf
fix(golangci.yml): move fiximports to goimports section and replace exportloopref with copyloopvar ( #4167 )
...
Co-authored-by: huangzw <huangzw@2345.com>
2025-03-18 23:13:03 +08:00
dependabot[bot]
733ee094fc
chore(deps): bump golang.org/x/net from 0.33.0 to 0.37.0 ( #4178 )
...
Bumps [golang.org/x/net](https://github.com/golang/net ) from 0.33.0 to 0.37.0.
- [Commits](https://github.com/golang/net/compare/v0.33.0...v0.37.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/net
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-03-18 22:15:13 +08:00
NezhaFan
a4baac6e5e
refactor(context):Avoid using filepath.Dir twice in SaveUploadedFile ( #4181 )
...
Co-authored-by: voyager1 <voyager1@voyager1deMacBook-Pro.local>
2025-03-18 22:14:38 +08:00
NezhaFan
1eb827240e
docs: fix case error of X-Real-IP ( #4185 )
...
Co-authored-by: voyager1 <voyager1@voyager1deMacBook-Pro.local>
2025-03-18 22:12:36 +08:00
Bo-Yi Wu
3b28645dc9
ci: add go version 1.24 to GitHub Actions ( #4154 )
...
- Add Go version `1.24` to the GitHub Actions workflow
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-02-12 10:22:02 +08:00
dependabot[bot]
c3c8620a7f
chore(deps): bump github.com/go-playground/validator/v10 from 10.20.0 to 10.22.1 ( #4052 )
...
Bumps [github.com/go-playground/validator/v10](https://github.com/go-playground/validator ) from 10.20.0 to 10.22.1.
- [Release notes](https://github.com/go-playground/validator/releases )
- [Commits](https://github.com/go-playground/validator/compare/v10.20.0...v10.22.1 )
---
updated-dependencies:
- dependency-name: github.com/go-playground/validator/v10
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-02-12 08:50:51 +08:00
Bo-Yi Wu
3f818c3fa6
chore(security): upgrade quic-go version to 0.48.2 ( #4127 )
...
- Update Go versions in GitHub Actions workflow to `1.22` and `1.23`
- Update README to require Go version `1.22` or above
- Adjust table formatting in README for better alignment
- Update warning message in `debug.go` to reflect Go version `1.22`
- Update test in `debug_test.go` to reflect Go version `1.22`
- Update `go.mod` to require Go version `1.22`
- Update dependencies in `go.mod` to newer versions
Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-12-30 11:40:37 +08:00
Bo-Yi Wu
23d6961aeb
ci(lint): update workflows and improve test request consistency ( #4126 )
...
- Update GoReleaser action to version 6 in GitHub workflow
- Use `http.MethodPost` constant in test requests instead of hardcoded string
Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-12-30 11:39:24 +08:00
Xianglin Gao
e2e80f3347
chore(security): update vendor to fix CVE ( #4121 )
...
Signed-off-by: Xianglin Gao <xianglingao@tencent.com>
2024-12-28 17:18:03 +08:00
haesuo566
e46bd52185
refactor(context): add an optional permission parameter to the SaveUploadedFile method ( #4068 ) ( #4088 )
...
Co-authored-by: hso <hso@trinitysoft.co.kr>
2024-11-15 23:54:06 +08:00
Matthieu MOREL
e8d34d053f
ci(lint): enable usestdlibvars linter ( #4091 )
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-11-15 23:52:16 +08:00
Matthieu MOREL
02c1144f31
ci(lint): enable perfsprint linter ( #4090 )
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-11-15 23:51:12 +08:00
Bo-Yi Wu
f875d87283
chore(context): test context initialization and handler logic ( #4087 )
...
* enhance code imported by #3413
if it needs to check if the handler is nil, tie c.index shall
always ++
* test: refactor test context initialization and handler logic
- Remove an empty line in `TestContextInitQueryCache`
- Add `TestContextNext` function with tests for `Next` method behavior with no handlers, one handler, and multiple handlers
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
---------
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: zjj <zhong2plus@gmail.com>
2024-11-15 23:49:08 +08:00