fix: version 2.9.2 (#4405)

This commit is contained in:
hailaz
2025-09-01 15:33:50 +08:00
committed by GitHub
parent f08897a114
commit 0c1d1ce828
33 changed files with 67 additions and 74 deletions

View File

@ -3,13 +3,13 @@ module github.com/gogf/gf/cmd/gf/v2
go 1.23.0
require (
github.com/gogf/gf/contrib/drivers/clickhouse/v2 v2.9.1
github.com/gogf/gf/contrib/drivers/mssql/v2 v2.9.1
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.1
github.com/gogf/gf/contrib/drivers/oracle/v2 v2.9.1
github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.9.1
github.com/gogf/gf/contrib/drivers/sqlite/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/contrib/drivers/clickhouse/v2 v2.9.2
github.com/gogf/gf/contrib/drivers/mssql/v2 v2.9.2
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.2
github.com/gogf/gf/contrib/drivers/oracle/v2 v2.9.2
github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.9.2
github.com/gogf/gf/contrib/drivers/sqlite/v2 v2.9.2
github.com/gogf/gf/v2 v2.9.2
github.com/gogf/selfupdate v0.0.0-20231215043001-5c48c528462f
github.com/olekukonko/tablewriter v1.0.9
github.com/schollz/progressbar/v3 v3.15.0

View File

@ -46,20 +46,6 @@ github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiU
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
github.com/gogf/gf/contrib/drivers/clickhouse/v2 v2.9.1 h1:EAYuBB2nDPZWN+wKTKYpmWPYyCKxUyZcjquKjw7amdo=
github.com/gogf/gf/contrib/drivers/clickhouse/v2 v2.9.1/go.mod h1:QkxWqj9uav2b0zYHTL3Ac0BIb82Q2VLQsEJ6NDLJERg=
github.com/gogf/gf/contrib/drivers/mssql/v2 v2.9.1 h1:86FNKYA7rQtUEsCmvl3zKPw7DhP0Vu7/XdmOqmQAWUQ=
github.com/gogf/gf/contrib/drivers/mssql/v2 v2.9.1/go.mod h1:1ylAGGQIOSls8tD9sGVgCcD11SVdueKJlt1+N4Y/RBA=
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.1 h1:UrIXxkF33h3g8CUdZ/L1iHsoTa10Y+V5STLvpN2JrPQ=
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.1/go.mod h1:U7no2FsvJGVI5TGVZxrPnVrQlz6WVgGNyOY/4ZcpQ84=
github.com/gogf/gf/contrib/drivers/oracle/v2 v2.9.1 h1:igxxdHCFEbMFC5Ia5JtqgrF7IGd2dcPC4fjOhQK2zmY=
github.com/gogf/gf/contrib/drivers/oracle/v2 v2.9.1/go.mod h1:5jiSUr3yMkmiDp2hhIlP8J49UOj05huS8/1li0DUV58=
github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.9.1 h1:mcKTrjzr4TGZCPMmbJwrY4+gPNotwoDEE58gOP3r+u4=
github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.9.1/go.mod h1:+dX7qOcgEHAXkgMU8inzdaXz56VQ5YFNdzuUEi92OWc=
github.com/gogf/gf/contrib/drivers/sqlite/v2 v2.9.1 h1:uDkIljyGxi4XJ7ozHICZcWZArEajAxI63lugrmE0fZ8=
github.com/gogf/gf/contrib/drivers/sqlite/v2 v2.9.1/go.mod h1:iNRez3vilRhMsZ1KsUPWD1B6BfaZNORqOXaKTDKoPa8=
github.com/gogf/gf/v2 v2.9.1 h1:KN3RLlSTSWZ48PXeDj6tlnxivPy0XvVC3K4vesbWpLI=
github.com/gogf/gf/v2 v2.9.1/go.mod h1:Zh0N1Q/H1D0stcFYDLMutLFQQ4g0uGBtxUvm6iMSWFQ=
github.com/gogf/selfupdate v0.0.0-20231215043001-5c48c528462f h1:7xfXR/BhG3JDqO1s45n65Oyx9t4E/UqDOXep6jXdLCM=
github.com/gogf/selfupdate v0.0.0-20231215043001-5c48c528462f/go.mod h1:HnYoio6S7VaFJdryKcD/r9HgX+4QzYfr00XiXUo/xz0=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=

View File

@ -4,7 +4,7 @@ go 1.23.0
require (
github.com/apolloconfig/agollo/v4 v4.3.1
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
)
require (

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/config/consul/v2
go 1.23.0
require (
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
github.com/hashicorp/consul/api v1.24.0
github.com/hashicorp/go-cleanhttp v0.5.2
)

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/config/kubecm/v2
go 1.24.0
require (
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
k8s.io/api v0.33.4
k8s.io/apimachinery v0.33.4
k8s.io/client-go v0.33.4

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/config/nacos/v2
go 1.23.0
require (
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
github.com/nacos-group/nacos-sdk-go/v2 v2.2.5
)

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/config/polaris/v2
go 1.23.0
require (
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
github.com/polarismesh/polaris-go v1.6.1
)

View File

@ -4,7 +4,7 @@ go 1.23.0
require (
github.com/ClickHouse/clickhouse-go/v2 v2.0.15
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
github.com/google/uuid v1.6.0
github.com/shopspring/decimal v1.3.1
)

View File

@ -6,7 +6,7 @@ replace github.com/gogf/gf/v2 => ../../../
require (
gitee.com/chunanyong/dm v1.8.12
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
)
require (

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/drivers/mssql/v2
go 1.23.0
require (
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
github.com/microsoft/go-mssqldb v1.7.1
)

View File

@ -4,7 +4,7 @@ go 1.23.0
require (
github.com/go-sql-driver/mysql v1.7.1
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
)
require (

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/drivers/oracle/v2
go 1.23.0
require (
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
github.com/sijms/go-ora/v2 v2.7.10
)

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/drivers/pgsql/v2
go 1.23.0
require (
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
github.com/lib/pq v1.10.9
)

View File

@ -4,7 +4,7 @@ go 1.23.0
require (
github.com/glebarez/go-sqlite v1.21.2
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
)
require (

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/drivers/sqlitecgo/v2
go 1.23.0
require (
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
github.com/mattn/go-sqlite3 v1.14.17
)

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/metric/otelmetric/v2
go 1.23.0
require (
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
github.com/prometheus/client_golang v1.23.0
go.opentelemetry.io/contrib/instrumentation/runtime v0.62.0
go.opentelemetry.io/otel v1.37.0

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/nosql/redis/v2
go 1.23.0
require (
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
github.com/redis/go-redis/v9 v9.12.1
go.opentelemetry.io/otel v1.37.0
go.opentelemetry.io/otel/trace v1.37.0

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/registry/consul/v2
go 1.23.0
require (
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
github.com/hashicorp/consul/api v1.26.1
)

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/registry/etcd/v2
go 1.23.0
require (
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
go.etcd.io/etcd/client/v3 v3.5.17
google.golang.org/grpc v1.59.0
)

View File

@ -2,7 +2,7 @@ module github.com/gogf/gf/contrib/registry/file/v2
go 1.23.0
require github.com/gogf/gf/v2 v2.9.1
require github.com/gogf/gf/v2 v2.9.2
require (
github.com/BurntSushi/toml v1.5.0 // indirect

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/registry/polaris/v2
go 1.23.0
require (
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
github.com/polarismesh/polaris-go v1.6.1
)

View File

@ -4,7 +4,7 @@ go 1.23.0
require (
github.com/go-zookeeper/zk v1.0.3
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
golang.org/x/sync v0.16.0
)

View File

@ -3,8 +3,8 @@ module github.com/gogf/gf/contrib/rpc/grpcx/v2
go 1.23.0
require (
github.com/gogf/gf/contrib/registry/file/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/contrib/registry/file/v2 v2.9.2
github.com/gogf/gf/v2 v2.9.2
go.opentelemetry.io/otel v1.37.0
go.opentelemetry.io/otel/trace v1.37.0
google.golang.org/grpc v1.64.1

View File

@ -2,7 +2,7 @@ module github.com/gogf/gf/contrib/sdk/httpclient/v2
go 1.23.0
require github.com/gogf/gf/v2 v2.9.1
require github.com/gogf/gf/v2 v2.9.2
require (
github.com/BurntSushi/toml v1.5.0 // indirect

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/trace/otlpgrpc/v2
go 1.23.0
require (
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
go.opentelemetry.io/otel v1.37.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/trace/otlphttp/v2
go 1.23.0
require (
github.com/gogf/gf/v2 v2.9.1
github.com/gogf/gf/v2 v2.9.2
go.opentelemetry.io/otel v1.37.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.37.0

View File

@ -716,6 +716,13 @@ const (
linkPatternDescription = `type:username:password@protocol(host:port)/dbname?param1=value1&...&paramN=valueN`
)
// Context key types to avoid collisions
type ctxKey string
const (
ctxKeyWrappedByGetCtxTimeout ctxKey = "WrappedByGetCtxTimeout"
)
type ctxTimeoutType int
const (

View File

@ -76,7 +76,7 @@ func (c *Core) GetCtxTimeout(ctx context.Context, timeoutType ctxTimeoutType) (c
if ctx == nil {
ctx = c.db.GetCtx()
} else {
ctx = context.WithValue(ctx, "WrappedByGetCtxTimeout", nil)
ctx = context.WithValue(ctx, ctxKeyWrappedByGetCtxTimeout, nil)
}
var config = c.db.GetConfig()
switch timeoutType {

View File

@ -57,10 +57,13 @@ type TxOptions struct {
ReadOnly bool
}
// Context key types for transaction to avoid collisions
type transactionCtxKey string
const (
transactionPointerPrefix = "transaction"
contextTransactionKeyPrefix = "TransactionObjectForGroup_"
transactionIdForLoggerCtx = "TransactionId"
transactionPointerPrefix = "transaction"
contextTransactionKeyPrefix = "TransactionObjectForGroup_"
transactionIdForLoggerCtx transactionCtxKey = "TransactionId"
)
var transactionIdGenerator = gtype.NewUint64()
@ -286,7 +289,7 @@ func TXFromCtx(ctx context.Context, group string) TX {
return nil
}
// transactionKeyForContext forms and returns a string for storing transaction object of certain database group into context.
func transactionKeyForContext(group string) string {
return contextTransactionKeyPrefix + group
// transactionKeyForContext forms and returns a key for storing transaction object of certain database group into context.
func transactionKeyForContext(group string) transactionCtxKey {
return transactionCtxKey(contextTransactionKeyPrefix + group)
}

View File

@ -11,7 +11,7 @@ import (
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gpage"
"github.com/gogf/gf/v2/util/gpage" //nolint:staticcheck
)
// GetPage creates and returns the pagination object for given `totalSize` and `pageSize`.

View File

@ -345,9 +345,9 @@ func (s *Server) doRouterMapDump() {
item.Middleware,
)
}
table.Append(data)
_ = table.Append(data)
}
table.Render()
_ = table.Render()
s.config.Logger.Header(false).Printf(ctx, "\n%s", buffer.String())
}
}

View File

@ -15,24 +15,21 @@ func (t *Timer) loop() {
timerIntervalTicker = time.NewTicker(t.options.Interval)
)
defer timerIntervalTicker.Stop()
for {
select {
case <-timerIntervalTicker.C:
// Check the timer status.
switch t.status.Val() {
case StatusRunning:
// Timer proceeding.
if currentTimerTicks = t.ticks.Add(1); currentTimerTicks >= t.queue.NextPriority() {
t.proceed(currentTimerTicks)
}
case StatusStopped:
// Do nothing.
case StatusClosed:
// Timer exits.
return
for range timerIntervalTicker.C {
// Check the timer status.
switch t.status.Val() {
case StatusRunning:
// Timer proceeding.
if currentTimerTicks = t.ticks.Add(1); currentTimerTicks >= t.queue.NextPriority() {
t.proceed(currentTimerTicks)
}
case StatusStopped:
// Do nothing.
case StatusClosed:
// Timer exits.
return
}
}
}

View File

@ -2,5 +2,5 @@ package gf
const (
// VERSION is the current GoFrame version.
VERSION = "v2.9.1"
VERSION = "v2.9.2"
)