Compare commits

..

1 Commits

Author SHA1 Message Date
d412444268 update gf cli to v2.9.3-rc4 2025-09-03 11:45:36 +08:00
31 changed files with 59 additions and 90 deletions

View File

@ -52,7 +52,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
name: GoFrame Release ${{ github.ref_name }}
name: GoFrame Release ${{ github.ref }}
draft: false
prerelease: false

View File

@ -38,7 +38,7 @@ A powerful framework for faster, easier, and more efficient project development.
💖 [Thanks to all the contributors who made GoFrame possible](https://github.com/gogf/gf/graphs/contributors) 💖
<a href="https://github.com/gogf/gf/graphs/contributors">
<img src="https://goframe.org/img/contributors.svg?version=v2.9.3" alt="goframe contributors"/>
<img src="https://goframe.org/img/contributors.svg?version=v2.9.2" alt="goframe contributors"/>
</a>
# License

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.3
github.com/gogf/gf/contrib/drivers/mssql/v2 v2.9.3
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.3
github.com/gogf/gf/contrib/drivers/oracle/v2 v2.9.3
github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.9.3
github.com/gogf/gf/contrib/drivers/sqlite/v2 v2.9.3
github.com/gogf/gf/v2 v2.9.3
github.com/gogf/gf/contrib/drivers/clickhouse/v2 v2.9.3-rc4
github.com/gogf/gf/contrib/drivers/mssql/v2 v2.9.3-rc4
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.3-rc4
github.com/gogf/gf/contrib/drivers/oracle/v2 v2.9.3-rc4
github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.9.3-rc4
github.com/gogf/gf/contrib/drivers/sqlite/v2 v2.9.3-rc4
github.com/gogf/gf/v2 v2.9.3-rc4
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,6 +46,20 @@ 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.3-rc4 h1:sgbsCVXSxIlQ2f54hlRHUAA0qGmf4+wRSxaAJt1vztE=
github.com/gogf/gf/contrib/drivers/clickhouse/v2 v2.9.3-rc4/go.mod h1:0NbySeKrmvtoz3xvpEo2b6prX+Da+qjCFfJKR1k+wig=
github.com/gogf/gf/contrib/drivers/mssql/v2 v2.9.3-rc4 h1:2yB6N9d98IwJSWHoIH4TUklSfpDtOUL/yBuImwkkcqU=
github.com/gogf/gf/contrib/drivers/mssql/v2 v2.9.3-rc4/go.mod h1:+u5ZmcYhD12a5beq54PzueBxJ8hMXze/xUxANhVaKZg=
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.3-rc4 h1:V9Z4yXIq1M9XYcL43cE2DVccdFXIKbpm2lsCONPREYE=
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.9.3-rc4/go.mod h1:mD/X23ti+NNWeF2s2ZkwN2ksr4POCNFMFqdq1/knrk8=
github.com/gogf/gf/contrib/drivers/oracle/v2 v2.9.3-rc4 h1:bb8N3YsX6NA4QQAAXcl78IoruuUBYncNlSyjfakMp4Q=
github.com/gogf/gf/contrib/drivers/oracle/v2 v2.9.3-rc4/go.mod h1:upRKiCCqTOtgZBHTerpb80jspSvzmodPgzj+3T9dMsc=
github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.9.3-rc4 h1:6qevDBTDjr5tNeQMCgDYcBnwdRMcwqrqqhqst1ov+Wk=
github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.9.3-rc4/go.mod h1:Z5EiSfRqH6ZIeiWvmqwdubdiAmVgwSo5eR+TyDMzm+4=
github.com/gogf/gf/contrib/drivers/sqlite/v2 v2.9.3-rc4 h1:2+tLmaVWt/YJwX6pFPYLBdRhfg1HHhf/Zibu2jNGgw4=
github.com/gogf/gf/contrib/drivers/sqlite/v2 v2.9.3-rc4/go.mod h1:PtYGmxT0ALn9NV2hXr2L9+yY0wZUyhmxU1k+8bzyLT0=
github.com/gogf/gf/v2 v2.9.3-rc4 h1:y1IT/c9f82qU0iDXucf8kqgCbnJeGiytOhm9iFbltPg=
github.com/gogf/gf/v2 v2.9.3-rc4/go.mod h1:w6rcfD13SmO7FKI80k9LSLiSMGqpMYp50Nfkrrc2sEE=
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
github.com/gogf/gf/v2 v2.9.3
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.3
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.3
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.3
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

@ -222,13 +222,14 @@ func StrToTime(str string, format ...string) (*Time, error) {
} else if match = timeRegex2.FindStringSubmatch(str); len(match) > 0 && match[1] != "" {
year, month, day = parseDateStr(match[1])
} else if match = timeRegex3.FindStringSubmatch(str); len(match) > 0 && match[1] != "" {
s := strings.ReplaceAll(match[2], ":", "")
if len(s) < 6 {
s += strings.Repeat("0", 6-len(s))
}
hour, _ = strconv.Atoi(match[1])
min, _ = strconv.Atoi(match[2])
sec, _ = strconv.Atoi(match[3])
nsec, _ = strconv.Atoi(match[4])
if hour > 23 || min > 59 || sec > 59 {
return nil, gerror.NewCodef(gcode.CodeInvalidParameter, `invalid time string "%s"`, str)
}
for i := 0; i < 9-len(match[4]); i++ {
nsec *= 10
}
@ -239,19 +240,13 @@ func StrToTime(str string, format ...string) (*Time, error) {
// Time
if len(match[2]) > 0 {
parts := strings.Split(match[2], ":")
if len(parts) >= 1 && parts[0] != "" {
hour, _ = strconv.Atoi(parts[0])
}
if len(parts) >= 2 && parts[1] != "" {
min, _ = strconv.Atoi(parts[1])
}
if len(parts) >= 3 && parts[2] != "" {
sec, _ = strconv.Atoi(parts[2])
}
if hour > 23 || min > 59 || sec > 59 {
return nil, gerror.NewCodef(gcode.CodeInvalidParameter, `invalid time string "%s"`, str)
s := strings.ReplaceAll(match[2], ":", "")
if len(s) < 6 {
s += strings.Repeat("0", 6-len(s))
}
hour, _ = strconv.Atoi(s[0:2])
min, _ = strconv.Atoi(s[2:4])
sec, _ = strconv.Atoi(s[4:6])
}
// Nanoseconds, check and perform bits filling
if len(match[3]) > 0 {

View File

@ -183,46 +183,6 @@ func Test_StrToTime(t *testing.T) {
}
}
// test special time string
var testSpecialDateTimes = []string{
"2006-01-02 8:04:05",
"2006-01-02 8:4:05",
"2006-01-02 8:4:5",
"2006-01-02 8:04:05.000",
"2006/01/02 8:4:5",
"2006.01.02 8:4:5.000",
"2006.01.02 - 8:4:5",
"2006.01.02 8:4:5 +0800 CST",
"2006-01-02T5:5:5+05:01",
"2006-01-01T19:3:5-05:01",
"2006-01-02T8:4:5",
"02-jan-2006 8:4:5",
"02/jan/2006 8:4:5",
"02.jan.2006 8:4:5",
"02.jan.2006:8:4:5",
}
for _, item := range testSpecialDateTimes {
timeTemp, err := gtime.StrToTime(item)
t.AssertNil(err)
t.Assert(timeTemp.Time.Local().Format("2006-01-02 15:04:05"), "2006-01-02 08:04:05")
}
// test error time string
var testErrorDateTimes = []string{
"2006-01-02 28:4:5",
"2006-01-02 8:60:5",
"2006-01-02 8:4:60",
"28:20:20",
"8:60:20",
"8:20:60",
}
for _, item := range testErrorDateTimes {
_, err := gtime.StrToTime(item)
if err == nil {
t.Error("test fail")
}
}
// test err
_, err := gtime.StrToTime("2006-01-02 15:04:05", "aabbccdd")
if err == nil {

View File

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