Commit Graph

6331 Commits

Author SHA1 Message Date
94b623e126 fix: update dependencies to version v2.9.1 for various contrib modules and drivers (#4386)
Fixes #4385
2025-08-27 12:21:38 +08:00
4262aa254d chore(deps): Update dependent versions to enhance compatibility and security (#4380)
#4344

---------

Co-authored-by: houseme <housemecn@gmail.com>
2025-08-23 14:53:49 +08:00
8cff64915b fix(tracing): set database span kind to client (#4334)
In [OpenTelemetry
spec](https://opentelemetry.io/docs/specs/semconv/database/database-spans/),
the span kind of database should be `client`.
2025-08-22 22:49:13 +08:00
bec98e8de0 fix(database/gdb): clickhouse can not support int128/int256/uint128/uint256 (#4370)
When use clickhouse and use field type int128/int256/uint128/uint256. It
can not work well and it will return 0 value.
Add the new field types to let it work well.

By the way, the data struct field need be set to big.Int when use the
types.
2025-08-22 22:05:15 +08:00
a6dbf4b7eb feat: upgrade workflow checkout version v5 (#4381)
feat: upgrade workflow checkout version v5

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-22 21:58:00 +08:00
0c2f60468b chore(deps): bump github.com/redis/go-redis/v9 from 9.7.0 to 9.12.1 in /contrib/nosql/redis (#4215)
Bumps [github.com/redis/go-redis/v9](https://github.com/redis/go-redis)
from 9.7.0 to 9.7.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/redis/go-redis/releases">github.com/redis/go-redis/v9's
releases</a>.</em></p>
<blockquote>
<h2>v9.7.3</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: handle network error on SETINFO (<a
href="https://redirect.github.com/redis/go-redis/issues/3295">#3295</a>)
(<a
href="https://github.com/redis/go-redis/security/advisories/GHSA-92cp-5422-2mw7">CVE-2025-29923</a>)</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/redis/go-redis/compare/v9.7.1...v9.7.3">https://github.com/redis/go-redis/compare/v9.7.1...v9.7.3</a></p>
<h2>v9.7.1</h2>
<h1>Changes</h1>
<ul>
<li>Recognize byte slice for key argument in cluster client hash slot
computation (<a
href="https://redirect.github.com/redis/go-redis/issues/3049">#3049</a>)</li>
<li>fix(search&amp;aggregate):fix error overwrite and typo <a
href="https://redirect.github.com/redis/go-redis/issues/3220">#3220</a>
(<a
href="https://redirect.github.com/redis/go-redis/issues/3224">#3224</a>)</li>
<li>fix: linter configuration (<a
href="https://redirect.github.com/redis/go-redis/issues/3279">#3279</a>)</li>
<li>fix(search): if ft.aggregate use limit when limitoffset is zero (<a
href="https://redirect.github.com/redis/go-redis/issues/3275">#3275</a>)</li>
<li>Reinstate read-only lock on hooks access in dialHook to fix data
race (<a
href="https://redirect.github.com/redis/go-redis/issues/3225">#3225</a>)</li>
<li>fix: flaky ClientKillByFilter test (<a
href="https://redirect.github.com/redis/go-redis/issues/3268">#3268</a>)</li>
<li>chore: fix some comments (<a
href="https://redirect.github.com/redis/go-redis/issues/3226">#3226</a>)</li>
<li>fix(aggregate, search): ft.aggregate bugfixes (<a
href="https://redirect.github.com/redis/go-redis/issues/3263">#3263</a>)</li>
<li>fix: add unstableresp3 to cluster client (<a
href="https://redirect.github.com/redis/go-redis/issues/3266">#3266</a>)</li>
<li>Fix race condition in clusterNodes.Addrs() (<a
href="https://redirect.github.com/redis/go-redis/issues/3219">#3219</a>)</li>
<li>SortByWithCount FTSearchOptions fix (<a
href="https://redirect.github.com/redis/go-redis/issues/3201">#3201</a>)</li>
<li>Eliminate redundant dial mutex causing unbounded connection queue
contention (<a
href="https://redirect.github.com/redis/go-redis/issues/3088">#3088</a>)</li>
<li>Add guidance on unstable RESP3 support for RediSearch commands to
README (<a
href="https://redirect.github.com/redis/go-redis/issues/3177">#3177</a>)</li>
</ul>
<h2>🚀 New Features</h2>
<ul>
<li>Add guidance on unstable RESP3 support for RediSearch commands to
README (<a
href="https://redirect.github.com/redis/go-redis/issues/3177">#3177</a>)</li>
</ul>
<h2>🐛 Bug Fixes</h2>
<ul>
<li>fix(search): if ft.aggregate use limit when limitoffset is zero (<a
href="https://redirect.github.com/redis/go-redis/issues/3275">#3275</a>)</li>
<li>fix: add unstableresp3 to cluster client (<a
href="https://redirect.github.com/redis/go-redis/issues/3266">#3266</a>)</li>
<li>fix(aggregate, search): ft.aggregate bugfixes (<a
href="https://redirect.github.com/redis/go-redis/issues/3263">#3263</a>)</li>
<li>SortByWithCount FTSearchOptions fix (<a
href="https://redirect.github.com/redis/go-redis/issues/3201">#3201</a>)</li>
<li>Recognize byte slice for key argument in cluster client hash slot
computation (<a
href="https://redirect.github.com/redis/go-redis/issues/3049">#3049</a>)</li>
</ul>
<h2>Contributors</h2>
<p>We'd like to thank all the contributors who worked on this
release!</p>
<p><a
href="https://github.com/ofekshenawa"><code>@​ofekshenawa</code></a>, <a
href="https://github.com/Cgol9"><code>@​Cgol9</code></a>, <a
href="https://github.com/LINKIWI"><code>@​LINKIWI</code></a>, <a
href="https://github.com/shawnwgit"><code>@​shawnwgit</code></a>, <a
href="https://github.com/zhuhaicity"><code>@​zhuhaicity</code></a>, <a
href="https://github.com/bitsark"><code>@​bitsark</code></a>, <a
href="https://github.com/vladvildanov"><code>@​vladvildanov</code></a>,
<a href="https://github.com/ndyakov"><code>@​ndyakov</code></a></p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/redis/go-redis/compare/v9.7.0...v9.7.1">https://github.com/redis/go-redis/compare/v9.7.0...v9.7.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a29d91d9ca"><code>a29d91d</code></a>
release 9.7.3, retract 9.7.2 (<a
href="https://redirect.github.com/redis/go-redis/issues/3314">#3314</a>)</li>
<li><a
href="ce3034c7b3"><code>ce3034c</code></a>
bump version to 9.7.2</li>
<li><a
href="0af2b32f93"><code>0af2b32</code></a>
fix: handle network error on SETINFO (<a
href="https://redirect.github.com/redis/go-redis/issues/3295">#3295</a>)
(CVE-2025-29923)</li>
<li><a
href="3d041a1dd6"><code>3d041a1</code></a>
release: 9.7.1 patch (<a
href="https://redirect.github.com/redis/go-redis/issues/3278">#3278</a>)</li>
<li>See full diff in <a
href="https://github.com/redis/go-redis/compare/v9.7.0...v9.7.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/redis/go-redis/v9&package-manager=go_modules&previous-version=9.7.0&new-version=9.7.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/gogf/gf/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-22 17:11:09 +08:00
656ae070da fix(cmd/gf): fix gen sharding dao in multiple shardingPattern tables … (#4379)
fix #4378 
fix #4330

---------

Co-authored-by: hailaz <739476267@qq.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-22 16:46:23 +08:00
2d5fcd73cb chore: upgrade dependencies to latest versions and fix security vulne… (#4237)
This PR includes the following updates and fixes:

- **Dependency upgrades**: Updated all dependencies in `go.mod` to their
latest versions to ensure compatibility and leverage the latest features
and fixes.
- **Security fixes**:
- Resolved known vulnerabilities in `golang.org/x/net` by upgrading to
the latest secure version.
- Addressed security issues in `golang.org/x/crypto` by upgrading to the
latest secure version.

These changes improve the overall security and stability of the project.
Please review the changes and ensure compatibility with the updated
dependencies.

---------

Co-authored-by: hailaz <739476267@qq.com>
2025-08-22 15:29:16 +08:00
82043856f4 chore(polaris): Bump github.com/polarismesh/polaris-go from v1.5.8 to v1.6.1 (#4241)
- Updated `github.com/polarismesh/polaris-go` dependency to v1.6.1 in
`go.mod`.
- Ensured compatibility with the latest changes in the Polaris Go SDK.
- Verified that all related functionality works as expected after the
upgrade.
- Resolved any potential breaking changes introduced in the new version.

This upgrade includes performance improvements, bug fixes, and new
features provided by the Polaris Go SDK.
2025-08-22 15:07:34 +08:00
7ffdff37e4 chore: upgrade golangci-lint configuration and optimize codebase (#4236)
This PR includes the following changes:

- **Upgrade `.golangci.yml`**: Updated the configuration file to align
with the latest golangci-lint version, ensuring compatibility and
leveraging new features.
- **Refactor GitHub Action workflow**: Modified `golangci-lint.yml` in
the GitHub Actions workflow to reflect the updated configuration and
improve CI performance.
- **Codebase optimization**: Refactored code to address issues and
warnings raised by the updated golangci-lint rules, including:
  - Improved function length and complexity.
  - Enhanced error handling and variable naming conventions.
- Fixed minor issues such as unused imports and formatting
inconsistencies.

These changes aim to maintain code quality, ensure compatibility with
the latest tools, and improve overall maintainability.
2025-08-22 13:29:09 +08:00
613
24083b865d fix(internal/utils): fix +.1 is pass checks numeric (#4374) 2025-08-21 15:44:26 +08:00
8cb64c9f88 fix(cmd/gf): "unknown time zone" when using "gf gen dao" for clickhouse on windows platform (#4368)
fix bug: could not load time location: "unknown time zone Asia/Shanghai"

The bug will appear when I use gf in windows to do "gf gen dao" for
clickhouse.
2025-08-15 13:35:59 +08:00
5fa656d1cc fix(os/gtime): add handling for nil time pointers to avoid causing panic (#4323)
from https://github.com/gogf/gf/pull/4322
Fixes https://github.com/gogf/gf/issues/4307
2025-06-24 15:53:47 +08:00
09ec90746a chore: bump golang.org/x/tools to v0.34.0 for Go 1.25 compatibility (#4313)
chore: bump golang.org/x/tools to v0.34.0 for Go 1.25 compatibility

```
   # golang.org/x/tools/internal/tokeninternal
  /Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/golang.org/x/tools@v0.21.1-0.20240508182429-e35e4ccd0d2d/internal/tokeninternal/tokeninternal.go:64:9: invalid array length -delta * delta (constant -256 of type int64)
```

relates to https://github.com/Homebrew/homebrew-core/pull/226636
2025-06-20 21:21:03 +08:00
c0d1e44526 fix(database/gdb): support multiple order fields in gdb_model_with and merged #4272 fix scanning functionality for deep slice types (#4320)
Fix:#4311
Merged: #4272
2025-06-20 21:09:41 +08:00
b323862b4c Merge pull request #1 from fainc/master
Update util/gconv/gconv_z_unit_scan_test.go
2025-06-20 19:23:04 +08:00
3d9cdb8997 fix(gdb): support multiple order fields in "with" 2025-06-20 19:11:01 +08:00
7180d895ea Update util/gconv/gconv_z_unit_scan_test.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-20 18:17:40 +08:00
afb1595fbe Merge branch 'gogf:master' into master 2025-06-20 18:07:15 +08:00
6637add9ca fix(net/ghttp): improve GetMetaTag method to handle nil and type checks (#4284)
修复没有做handler参数数量判断导致可能出现的数组越界问题
2025-06-19 09:43:24 +08:00
bc862cf97b chore: bump golang.org/x/tools to v0.34.0 for Go 1.25 compatibility
Signed-off-by: Rui Chen <rui@chenrui.dev>
2025-06-14 13:34:25 -04:00
9033ca087b fix(net/ghttp): improve GetMetaTag method to handle nil and type checks 2025-05-16 17:55:00 +08:00
b985fd978c Merge branch 'master' into master 2025-05-07 20:02:12 +08:00
88c4471500 fix(ci): change base image from expired ubuntu-22.04 to ubuntu-latest (#4273) 2025-05-07 19:06:00 +08:00
b73e2047db fix(gconv): fix scanning functionality for deep slice types 2025-05-06 13:37:45 +08:00
1534abdb05 feat(util/gpage): marked deprecated (#4230) 2025-04-02 19:56:28 +08:00
fee38b4531 feat(net/ghttp): enhance GetHeader method to support default values (#4210) 2025-03-25 20:42:30 +08:00
69e3362d0d feat: new version v2.9.0 (#4204) contrib/metric/otelmetric/v2.9.0 contrib/drivers/dm/v2.9.0 contrib/drivers/pgsql/v2.9.0 contrib/registry/nacos/v2.9.0 contrib/config/apollo/v2.9.0 contrib/config/kubecm/v2.9.0 contrib/registry/polaris/v2.9.0 contrib/registry/file/v2.9.0 contrib/drivers/clickhouse/v2.9.0 contrib/drivers/sqlite/v2.9.0 contrib/config/nacos/v2.9.0 contrib/config/consul/v2.9.0 contrib/drivers/mssql/v2.9.0 cmd/gf/internal/cmd/testdata/build/varmap/v2.9.0 contrib/registry/etcd/v2.9.0 contrib/trace/otlphttp/v2.9.0 contrib/registry/zookeeper/v2.9.0 contrib/sdk/httpclient/v2.9.0 contrib/drivers/mysql/v2.9.0 contrib/drivers/sqlitecgo/v2.9.0 contrib/registry/consul/v2.9.0 contrib/nosql/redis/v2.9.0 contrib/drivers/oracle/v2.9.0 contrib/rpc/grpcx/v2.9.0 v2.9.0 cmd/gf/v2.9.0 contrib/trace/otlpgrpc/v2.9.0 contrib/config/polaris/v2.9.0 2025-03-17 15:52:26 +08:00
9a61a6970f fix(database/gdb): fix transaction propagation feature (#4199) 2025-03-17 14:50:07 +08:00
abf77fac50 fix(cmd/gf): invalid binary suffix after installing binary using custom renamed file name that has suffix with . character (#4207) 2025-03-17 13:48:54 +08:00
07696fc779 feat(net/ghttp): add GetMetaTag function to retrieve metadata value for HandlerItem (#4206) 2025-03-17 09:21:00 +08:00
bc1e1019c5 refract(util/gconv): change Converter interface definition for more convenient usage (#4202) 2025-03-14 18:23:07 +08:00
bb696bb281 refract(net/ghttp): move Request.GetMetaTag to HandlerItemParsed.GetMetaTag (#4191) 2025-03-12 21:55:35 +08:00
029f324c5c feat: version v2.9.0-beta (#4189) contrib/drivers/mssql/v2.9.0-beta contrib/config/consul/v2.9.0-beta contrib/metric/otelmetric/v2.9.0-beta contrib/drivers/pgsql/v2.9.0-beta contrib/trace/otlpgrpc/v2.9.0-beta contrib/drivers/dm/v2.9.0-beta contrib/registry/nacos/v2.9.0-beta cmd/gf/v2.9.0-beta v2.9.0-beta contrib/config/apollo/v2.9.0-beta contrib/config/kubecm/v2.9.0-beta contrib/config/polaris/v2.9.0-beta contrib/rpc/grpcx/v2.9.0-beta contrib/registry/polaris/v2.9.0-beta contrib/drivers/clickhouse/v2.9.0-beta contrib/registry/file/v2.9.0-beta contrib/drivers/oracle/v2.9.0-beta contrib/nosql/redis/v2.9.0-beta contrib/registry/zookeeper/v2.9.0-beta contrib/config/nacos/v2.9.0-beta contrib/drivers/sqlitecgo/v2.9.0-beta contrib/registry/consul/v2.9.0-beta contrib/drivers/mysql/v2.9.0-beta contrib/registry/etcd/v2.9.0-beta cmd/gf/internal/cmd/testdata/build/varmap/v2.9.0-beta contrib/sdk/httpclient/v2.9.0-beta contrib/drivers/sqlite/v2.9.0-beta contrib/trace/otlphttp/v2.9.0-beta 2025-03-09 22:31:20 +08:00
f8331bad6e feat(net/ghttp): add Request.GetMetaTag to retrieve specific meta tag value (#4185) 2025-03-09 11:17:41 +08:00
bcda48bf82 fix(net/ghttp):check parameter existence to determine using default or front-end value. (#4182) 2025-03-08 20:56:27 +08:00
a8a055f122 fix(util/gvalid): lots of memory consumed when required validation on big binary field (#4097) 2025-03-07 13:52:12 +08:00
dfe088f5cd refactor(util/gconv): add Converter feature for more flexable and extensible type converting (#4107) 2025-03-06 23:04:26 +08:00
f4074cd815 fix(net/gclient): remove default discovery for gclient when Discovery feature enabled (#4174) 2025-03-03 16:43:21 +08:00
4a65e7a629 feat: v2.9.0 (#4057) 2025-02-27 15:53:19 +08:00
ac653d3dee Merge branch 'master' into feat/v2.9.0 2025-02-27 14:36:05 +08:00
2d3ab4f9fb feat: add submodule examples (#4137) 2025-02-27 14:35:00 +08:00
bda42d18ee feat(cmd/gf): add controller comment support for command gf gen ctrl (#4169) 2025-02-27 14:21:40 +08:00
63cb3285f8 fix(net/ghttp): update response message handling in MiddlewareHandlerResponse (#4162) 2025-02-27 11:59:26 +08:00
2fa03556ef chore(util/gvalid): using 64 instead of 10 bitsize parameter for function strconv.ParseFloat although it treats 10 as 64 internally (#4154) 2025-02-20 16:32:01 +08:00
01593ad8b6 fix(ci): golangci-lint failed after upgrading go version to 1.24 (#4158) 2025-02-14 22:24:18 +08:00
42d8845d35 feat(cmd/gf): add gopackage option for command gf gen pbentity to specify go_package for generated proto files (#4141) 2025-02-14 13:39:13 +08:00
1ef1c442d3 test(os/gproc): add unit test for os/gproc (#4140) 2025-02-14 13:36:17 +08:00
7d3b055d3e fix(net/ghttp): MakeBodyRepeatableRead takes not effective when called after ParseForm (#4143) 2025-02-11 18:02:26 +08:00
a3b3c656d9 feat(database/gdb): enable transaction propagation when using tx.GetCtx() after Begin (#4121) 2025-02-11 16:09:27 +08:00