diff --git a/Makefile b/Makefile index 4db418ccc..eee8dddc7 100644 --- a/Makefile +++ b/Makefile @@ -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 \ No newline at end of file + done + + diff --git a/cmd/gf/go.mod b/cmd/gf/go.mod index 11d7cad8d..0c1ab6b33 100644 --- a/cmd/gf/go.mod +++ b/cmd/gf/go.mod @@ -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 ) diff --git a/cmd/gf/go.sum b/cmd/gf/go.sum index 6217a7d18..02de65887 100644 --- a/cmd/gf/go.sum +++ b/cmd/gf/go.sum @@ -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= diff --git a/container/garray/garray_normal_any.go b/container/garray/garray_normal_any.go index b3722bacf..0ce08bdaa 100644 --- a/container/garray/garray_normal_any.go +++ b/container/garray/garray_normal_any.go @@ -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() diff --git a/container/garray/garray_normal_int.go b/container/garray/garray_normal_int.go index 00aad85ad..a14733170 100644 --- a/container/garray/garray_normal_int.go +++ b/container/garray/garray_normal_int.go @@ -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() diff --git a/container/garray/garray_normal_str.go b/container/garray/garray_normal_str.go index 3ed3f1dc9..559215963 100644 --- a/container/garray/garray_normal_str.go +++ b/container/garray/garray_normal_str.go @@ -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() diff --git a/container/garray/garray_sorted_any.go b/container/garray/garray_sorted_any.go index 44ef22cfb..8ab6e3ee5 100644 --- a/container/garray/garray_sorted_any.go +++ b/container/garray/garray_sorted_any.go @@ -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() diff --git a/container/garray/garray_sorted_int.go b/container/garray/garray_sorted_int.go index 08f9711c1..b9181aea3 100644 --- a/container/garray/garray_sorted_int.go +++ b/container/garray/garray_sorted_int.go @@ -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() diff --git a/container/garray/garray_sorted_str.go b/container/garray/garray_sorted_str.go index af2bb1755..fa00b7c71 100644 --- a/container/garray/garray_sorted_str.go +++ b/container/garray/garray_sorted_str.go @@ -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() diff --git a/contrib/config/apollo/go.mod b/contrib/config/apollo/go.mod index 0226c8e1b..9edd317a9 100644 --- a/contrib/config/apollo/go.mod +++ b/contrib/config/apollo/go.mod @@ -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 => ../../../ diff --git a/contrib/config/kubecm/go.mod b/contrib/config/kubecm/go.mod index c3d4a2c29..c0dde1d95 100644 --- a/contrib/config/kubecm/go.mod +++ b/contrib/config/kubecm/go.mod @@ -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 diff --git a/contrib/config/nacos/go.mod b/contrib/config/nacos/go.mod index 1293f7a14..835875cf5 100644 --- a/contrib/config/nacos/go.mod +++ b/contrib/config/nacos/go.mod @@ -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 ) diff --git a/contrib/config/polaris/go.mod b/contrib/config/polaris/go.mod index dc63d8c6c..dfb5be439 100644 --- a/contrib/config/polaris/go.mod +++ b/contrib/config/polaris/go.mod @@ -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 ) diff --git a/contrib/drivers/clickhouse/go.mod b/contrib/drivers/clickhouse/go.mod index ebd7c934a..6e9bc9e28 100644 --- a/contrib/drivers/clickhouse/go.mod +++ b/contrib/drivers/clickhouse/go.mod @@ -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 ) diff --git a/contrib/drivers/dm/go.mod b/contrib/drivers/dm/go.mod index 553864ab9..1685673ea 100644 --- a/contrib/drivers/dm/go.mod +++ b/contrib/drivers/dm/go.mod @@ -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 ) diff --git a/contrib/drivers/mssql/go.mod b/contrib/drivers/mssql/go.mod index 7cb5e12fc..dc884c34d 100644 --- a/contrib/drivers/mssql/go.mod +++ b/contrib/drivers/mssql/go.mod @@ -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 => ../../../ diff --git a/contrib/drivers/mssql/mssql_z_basic_test.go b/contrib/drivers/mssql/mssql_z_basic_test.go index 9b2e11df7..f27a3095e 100644 --- a/contrib/drivers/mssql/mssql_z_basic_test.go +++ b/contrib/drivers/mssql/mssql_z_basic_test.go @@ -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) }) } diff --git a/contrib/drivers/mssql/mssql_z_model_test.go b/contrib/drivers/mssql/mssql_z_model_test.go index 0b0ad2e43..1f8bc6de1 100644 --- a/contrib/drivers/mssql/mssql_z_model_test.go +++ b/contrib/drivers/mssql/mssql_z_model_test.go @@ -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) diff --git a/contrib/drivers/mysql/go.mod b/contrib/drivers/mysql/go.mod index 280e597e8..a71a50738 100644 --- a/contrib/drivers/mysql/go.mod +++ b/contrib/drivers/mysql/go.mod @@ -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 => ../../../ diff --git a/contrib/drivers/oracle/go.mod b/contrib/drivers/oracle/go.mod index d750c13cf..ac3495bb1 100644 --- a/contrib/drivers/oracle/go.mod +++ b/contrib/drivers/oracle/go.mod @@ -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 ) diff --git a/contrib/drivers/pgsql/go.mod b/contrib/drivers/pgsql/go.mod index 459e6181a..3d02e13f6 100644 --- a/contrib/drivers/pgsql/go.mod +++ b/contrib/drivers/pgsql/go.mod @@ -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 ) diff --git a/contrib/drivers/sqlite/go.mod b/contrib/drivers/sqlite/go.mod index 7011baaeb..cfb492d63 100644 --- a/contrib/drivers/sqlite/go.mod +++ b/contrib/drivers/sqlite/go.mod @@ -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 => ../../../ diff --git a/contrib/nosql/redis/go.mod b/contrib/nosql/redis/go.mod index 60cad215a..18227064b 100644 --- a/contrib/nosql/redis/go.mod +++ b/contrib/nosql/redis/go.mod @@ -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 ) diff --git a/contrib/registry/etcd/go.mod b/contrib/registry/etcd/go.mod index 7d9dcd348..add24b9f2 100644 --- a/contrib/registry/etcd/go.mod +++ b/contrib/registry/etcd/go.mod @@ -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 ) diff --git a/contrib/registry/file/go.mod b/contrib/registry/file/go.mod index cf882a9e2..bb69af75f 100644 --- a/contrib/registry/file/go.mod +++ b/contrib/registry/file/go.mod @@ -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 => ../../../ diff --git a/contrib/registry/polaris/go.mod b/contrib/registry/polaris/go.mod index 14b0f2b4f..fa359233b 100644 --- a/contrib/registry/polaris/go.mod +++ b/contrib/registry/polaris/go.mod @@ -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 ) diff --git a/contrib/registry/zookeeper/go.mod b/contrib/registry/zookeeper/go.mod index 1443ce6f8..4d1aa38f6 100644 --- a/contrib/registry/zookeeper/go.mod +++ b/contrib/registry/zookeeper/go.mod @@ -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 ) diff --git a/contrib/rpc/grpcx/go.mod b/contrib/rpc/grpcx/go.mod index da2e5e09a..6691c70f6 100644 --- a/contrib/rpc/grpcx/go.mod +++ b/contrib/rpc/grpcx/go.mod @@ -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 diff --git a/contrib/trace/jaeger/go.mod b/contrib/trace/jaeger/go.mod index ee1ba8f9f..8c8e44c72 100644 --- a/contrib/trace/jaeger/go.mod +++ b/contrib/trace/jaeger/go.mod @@ -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 diff --git a/example/go.mod b/example/go.mod index ffde3ffbe..ed51c3b2c 100644 --- a/example/go.mod +++ b/example/go.mod @@ -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 diff --git a/version.go b/version.go index e754d6bd7..a0fcbd74b 100644 --- a/version.go +++ b/version.go @@ -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" )