version v2.4.0 (#2595)

This commit is contained in:
John Guo 2023-04-24 11:44:19 +08:00 committed by GitHub
parent 9171585b2c
commit 894f202b75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 64 additions and 73 deletions

View File

@ -16,6 +16,7 @@ lint:
golangci-lint run
# make version to=v2.4.0
.PHONY: version
version:
$(eval files=$(shell find . -name go.mod))
@set -e; \
@ -45,4 +46,6 @@ version:
go mod tidy; \
cd -; \
fi \
done
done

View File

@ -3,13 +3,13 @@ module github.com/gogf/gf/cmd/gf/v2
go 1.18
require (
github.com/gogf/gf/contrib/drivers/clickhouse/v2 v2.3.3
github.com/gogf/gf/contrib/drivers/mssql/v2 v2.3.3
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.3.3
github.com/gogf/gf/contrib/drivers/oracle/v2 v2.3.3
github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.3.3
github.com/gogf/gf/contrib/drivers/sqlite/v2 v2.3.3
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/contrib/drivers/clickhouse/v2 v2.4.0
github.com/gogf/gf/contrib/drivers/mssql/v2 v2.4.0
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.4.0
github.com/gogf/gf/contrib/drivers/oracle/v2 v2.4.0
github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.4.0
github.com/gogf/gf/contrib/drivers/sqlite/v2 v2.4.0
github.com/gogf/gf/v2 v2.4.0
github.com/olekukonko/tablewriter v0.0.5
golang.org/x/tools v0.7.0
)

View File

@ -124,6 +124,7 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

View File

@ -795,11 +795,9 @@ func (a *Array) UnmarshalValue(value interface{}) error {
return nil
}
// Filter `filter func(value interface{}, index int) bool` filter array, value
// means the value of the current element, the index of the current original
// color of value, when the custom function returns True, the element will be
// filtered, otherwise it will not be filtered, `Filter` function returns a new
// array, will not modify the original array.
// Filter iterates array and filters elements using custom callback function.
// It removes the element from array if callback function `filter` returns true,
// it or else does nothing and continues iterating.
func (a *Array) Filter(filter func(index int, value interface{}) bool) *Array {
a.mu.Lock()
defer a.mu.Unlock()

View File

@ -788,11 +788,9 @@ func (a *IntArray) UnmarshalValue(value interface{}) error {
return nil
}
// Filter `filter func(value int, index int) bool` filter array, value
// means the value of the current element, the index of the current original
// color of value, when the custom function returns True, the element will be
// filtered, otherwise it will not be filtered, `Filter` function returns a new
// array, will not modify the original array.
// Filter iterates array and filters elements using custom callback function.
// It removes the element from array if callback function `filter` returns true,
// it or else does nothing and continues iterating.
func (a *IntArray) Filter(filter func(index int, value int) bool) *IntArray {
a.mu.Lock()
defer a.mu.Unlock()

View File

@ -799,11 +799,9 @@ func (a *StrArray) UnmarshalValue(value interface{}) error {
return nil
}
// Filter `filter func(value string, index int) bool` filter array, value
// means the value of the current element, the index of the current original
// color of value, when the custom function returns True, the element will be
// filtered, otherwise it will not be filtered, `Filter` function returns a new
// array, will not modify the original array.
// Filter iterates array and filters elements using custom callback function.
// It removes the element from array if callback function `filter` returns true,
// it or else does nothing and continues iterating.
func (a *StrArray) Filter(filter func(index int, value string) bool) *StrArray {
a.mu.Lock()
defer a.mu.Unlock()

View File

@ -761,11 +761,9 @@ func (a *SortedArray) FilterNil() *SortedArray {
return a
}
// Filter `filter func(value interface{}, index int) bool` filter array, value
// means the value of the current element, the index of the current original
// color of value, when the custom function returns True, the element will be
// filtered, otherwise it will not be filtered, `Filter` function returns a new
// array, will not modify the original array.
// Filter iterates array and filters elements using custom callback function.
// It removes the element from array if callback function `filter` returns true,
// it or else does nothing and continues iterating.
func (a *SortedArray) Filter(filter func(index int, value interface{}) bool) *SortedArray {
a.mu.Lock()
defer a.mu.Unlock()

View File

@ -709,11 +709,9 @@ func (a *SortedIntArray) UnmarshalValue(value interface{}) (err error) {
return err
}
// Filter `filter func(value int, index int) bool` filter array, value
// means the value of the current element, the index of the current original
// color of value, when the custom function returns True, the element will be
// filtered, otherwise it will not be filtered, `Filter` function returns a new
// array, will not modify the original array.
// Filter iterates array and filters elements using custom callback function.
// It removes the element from array if callback function `filter` returns true,
// it or else does nothing and continues iterating.
func (a *SortedIntArray) Filter(filter func(index int, value int) bool) *SortedIntArray {
a.mu.Lock()
defer a.mu.Unlock()

View File

@ -722,11 +722,9 @@ func (a *SortedStrArray) UnmarshalValue(value interface{}) (err error) {
return err
}
// Filter `filter func(value string, index int) bool` filter array, value
// means the value of the current element, the index of the current original
// color of value, when the custom function returns True, the element will be
// filtered, otherwise it will not be filtered, `Filter` function returns a new
// array, will not modify the original array.
// Filter iterates array and filters elements using custom callback function.
// It removes the element from array if callback function `filter` returns true,
// it or else does nothing and continues iterating.
func (a *SortedStrArray) Filter(filter func(index int, value string) bool) *SortedStrArray {
a.mu.Lock()
defer a.mu.Unlock()

View File

@ -4,7 +4,7 @@ go 1.15
require (
github.com/apolloconfig/agollo/v4 v4.1.1
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/v2 v2.4.0
)
replace github.com/gogf/gf/v2 => ../../../

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/config/kubecm/v2
go 1.18
require (
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/v2 v2.4.0
k8s.io/api v0.25.2
k8s.io/apimachinery v0.25.2
k8s.io/client-go v0.25.2

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/config/nacos/v2
go 1.15
require (
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/v2 v2.4.0
github.com/nacos-group/nacos-sdk-go v1.1.2
)

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/config/polaris/v2
go 1.15
require (
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/v2 v2.4.0
github.com/polarismesh/polaris-go v1.3.0
)

View File

@ -4,7 +4,7 @@ go 1.15
require (
github.com/ClickHouse/clickhouse-go/v2 v2.0.15
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/v2 v2.4.0
github.com/google/uuid v1.3.0
github.com/shopspring/decimal v1.3.1
)

View File

@ -6,5 +6,5 @@ replace github.com/gogf/gf/v2 => ../../../
require (
gitee.com/chunanyong/dm v1.8.10
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/v2 v2.4.0
)

View File

@ -4,7 +4,7 @@ go 1.15
require (
github.com/denisenkom/go-mssqldb v0.11.0
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/v2 v2.4.0
)
replace github.com/gogf/gf/v2 => ../../../

View File

@ -286,7 +286,6 @@ func Test_DB_Insert(t *testing.T) {
t.Assert(one["PASSPORT"].String(), "t200")
t.Assert(one["PASSWORD"].String(), "25d55ad283aa400af464c76d71qw07ad")
t.Assert(one["NICKNAME"].String(), "T200")
t.Assert(one["CREATE_TIME"].GTime(), timeNow)
})
}

View File

@ -25,7 +25,7 @@ import (
func TestPage(t *testing.T) {
table := createInitTable()
defer dropTable(table)
db.SetDebug(true)
//db.SetDebug(true)
result, err := db.Model(table).Page(1, 2).Order("id").All()
gtest.Assert(err, nil)
fmt.Println("page:1--------", result)

View File

@ -4,7 +4,7 @@ go 1.15
require (
github.com/go-sql-driver/mysql v1.6.0
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/v2 v2.4.0
)
replace github.com/gogf/gf/v2 => ../../../

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/drivers/oracle/v2
go 1.17
require (
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/v2 v2.4.0
github.com/sijms/go-ora/v2 v2.4.20
)

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/drivers/pgsql/v2
go 1.15
require (
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/v2 v2.4.0
github.com/lib/pq v1.10.4
)

View File

@ -4,7 +4,7 @@ go 1.15
require (
github.com/glebarez/go-sqlite v1.17.3
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/v2 v2.4.0
)
replace github.com/gogf/gf/v2 => ../../../

View File

@ -4,7 +4,7 @@ go 1.15
require (
github.com/go-redis/redis/v8 v8.11.5
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/v2 v2.4.0
go.opentelemetry.io/otel v1.7.0
go.opentelemetry.io/otel/trace v1.7.0
)

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/registry/etcd/v2
go 1.15
require (
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/v2 v2.4.0
go.etcd.io/etcd/client/v3 v3.5.4
)

View File

@ -2,6 +2,6 @@ module github.com/gogf/gf/contrib/registry/file/v2
go 1.15
require github.com/gogf/gf/v2 v2.3.3
require github.com/gogf/gf/v2 v2.4.0
replace github.com/gogf/gf/v2 => ../../../

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/registry/polaris/v2
go 1.15
require (
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/v2 v2.4.0
github.com/polarismesh/polaris-go v1.3.0
)

View File

@ -4,7 +4,7 @@ go 1.15
require (
github.com/go-zookeeper/zk v1.0.3
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/v2 v2.4.0
golang.org/x/sync v0.1.0
)

View File

@ -3,8 +3,8 @@ module github.com/gogf/gf/contrib/rpc/grpcx/v2
go 1.15
require (
github.com/gogf/gf/contrib/registry/file/v2 v2.3.3
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/contrib/registry/file/v2 v2.4.0
github.com/gogf/gf/v2 v2.4.0
go.opentelemetry.io/otel v1.10.0
go.opentelemetry.io/otel/trace v1.10.0
golang.org/x/net v0.0.0-20220919232410-f2f64ebce3c1 // indirect

View File

@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/trace/jaeger/v2
go 1.15
require (
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/v2 v2.4.0
go.opentelemetry.io/otel v1.7.0
go.opentelemetry.io/otel/exporters/jaeger v1.7.0
go.opentelemetry.io/otel/sdk v1.7.0

View File

@ -3,18 +3,18 @@ module github.com/gogf/gf/example
go 1.15
require (
github.com/gogf/gf/contrib/config/apollo/v2 v2.3.3
github.com/gogf/gf/contrib/config/kubecm/v2 v2.3.3
github.com/gogf/gf/contrib/config/nacos/v2 v2.3.3
github.com/gogf/gf/contrib/config/polaris/v2 v2.3.3
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.3.3
github.com/gogf/gf/contrib/nosql/redis/v2 v2.3.3
github.com/gogf/gf/contrib/registry/etcd/v2 v2.3.3
github.com/gogf/gf/contrib/registry/file/v2 v2.3.3
github.com/gogf/gf/contrib/registry/polaris/v2 v2.3.3
github.com/gogf/gf/contrib/rpc/grpcx/v2 v2.3.3
github.com/gogf/gf/contrib/trace/jaeger/v2 v2.3.3
github.com/gogf/gf/v2 v2.3.3
github.com/gogf/gf/contrib/config/apollo/v2 v2.4.0
github.com/gogf/gf/contrib/config/kubecm/v2 v2.4.0
github.com/gogf/gf/contrib/config/nacos/v2 v2.4.0
github.com/gogf/gf/contrib/config/polaris/v2 v2.4.0
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.4.0
github.com/gogf/gf/contrib/nosql/redis/v2 v2.4.0
github.com/gogf/gf/contrib/registry/etcd/v2 v2.4.0
github.com/gogf/gf/contrib/registry/file/v2 v2.4.0
github.com/gogf/gf/contrib/registry/polaris/v2 v2.4.0
github.com/gogf/gf/contrib/rpc/grpcx/v2 v2.4.0
github.com/gogf/gf/contrib/trace/jaeger/v2 v2.4.0
github.com/gogf/gf/v2 v2.4.0
github.com/nacos-group/nacos-sdk-go v1.1.2
github.com/polarismesh/polaris-go v1.3.0
google.golang.org/grpc v1.49.0

View File

@ -1,6 +1,6 @@
package gf
const (
// VERSION is the current GoFrame version.
VERSION = "v2.4.0-rc4"
// VERSION is the current GoFrame version.
VERSION = "v2.4.0"
)