diff --git a/address.go b/address.go index 7b87454..4a3ea1d 100644 --- a/address.go +++ b/address.go @@ -1,4 +1,4 @@ -package datatypes +package datatypex import ( "database/sql/driver" diff --git a/address_test.go b/address_test.go index 92894a8..bbd13f5 100644 --- a/address_test.go +++ b/address_test.go @@ -1,4 +1,4 @@ -package datatypes_test +package datatypex_test import ( "testing" @@ -6,7 +6,7 @@ import ( . "github.com/onsi/gomega" "github.com/pkg/errors" - . "github.com/sincospro/datatypes" + . "github.com/xoctopus/datatypex" ) func TestAddress_MarshalText(t *testing.T) { diff --git a/binary.go b/binary.go index c03b602..21e0f9f 100644 --- a/binary.go +++ b/binary.go @@ -1,4 +1,4 @@ -package datatypes +package datatypex type Binary []byte diff --git a/binary_test.go b/binary_test.go index 598ec5c..b6ba730 100644 --- a/binary_test.go +++ b/binary_test.go @@ -1,11 +1,11 @@ -package datatypes_test +package datatypex_test import ( "testing" . "github.com/onsi/gomega" - . "github.com/sincospro/datatypes" + . "github.com/xoctopus/datatypex" ) func TestBinary(t *testing.T) { diff --git a/endpoint.go b/endpoint.go index 9cef774..0b53efb 100644 --- a/endpoint.go +++ b/endpoint.go @@ -1,4 +1,4 @@ -package datatypes +package datatypex import ( "fmt" @@ -9,8 +9,8 @@ import ( "strings" "github.com/pkg/errors" - "github.com/sincospro/x/reflectx" - "github.com/sincospro/x/textx" + "github.com/xoctopus/x/reflectx" + "github.com/xoctopus/x/textx" ) type Endpoint struct { diff --git a/endpoint_test.go b/endpoint_test.go index 7263d82..829b355 100644 --- a/endpoint_test.go +++ b/endpoint_test.go @@ -1,4 +1,4 @@ -package datatypes_test +package datatypex_test import ( "net/url" @@ -8,7 +8,7 @@ import ( "github.com/davecgh/go-spew/spew" . "github.com/onsi/gomega" - . "github.com/sincospro/datatypes" + . "github.com/xoctopus/datatypex" ) func TestEndpoint(t *testing.T) { diff --git a/go.mod b/go.mod index a2b0e69..8ec42b1 100644 --- a/go.mod +++ b/go.mod @@ -1,18 +1,18 @@ -module github.com/sincospro/datatypes +module github.com/xoctopus/datatypex go 1.22.0 require ( github.com/agiledragon/gomonkey/v2 v2.11.0 github.com/davecgh/go-spew v1.1.1 - github.com/onsi/gomega v1.32.0 + github.com/onsi/gomega v1.33.1 github.com/pkg/errors v0.9.1 - github.com/sincospro/x v0.0.2 + github.com/xoctopus/x v0.0.13 ) require ( github.com/google/go-cmp v0.6.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/text v0.15.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 618635d..2ac6bd8 100644 --- a/go.sum +++ b/go.sum @@ -2,39 +2,39 @@ github.com/agiledragon/gomonkey/v2 v2.11.0 h1:5oxSgA+tC1xuGsrIorR+sYiziYltmJyEZ9 github.com/agiledragon/gomonkey/v2 v2.11.0/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= -github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= -github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk= -github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg= +github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g= +github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= +github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= +github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/sincospro/x v0.0.2 h1:nzqA3BHWMsg4MiMQcfwxE3cQEPcT/EXdOxX2CtMusu8= -github.com/sincospro/x v0.0.2/go.mod h1:yr0yXf1eIoCa8WRvlqKcTa+GEci5CYbkbPRmO/v3GB8= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/xoctopus/x v0.0.13 h1:0W2xq0RWye3hTszq1dX/A57Gm7K06VzkTGg3DZGo/uY= +github.com/xoctopus/x v0.0.13/go.mod h1:WTjvuc3Qxn1RaQ536VQjnsh33LhVwtxWUDydlrETxPw= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= -golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= +golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/initializer/initializer_test.go b/initializer/initializer_test.go index e1c51e0..989c048 100644 --- a/initializer/initializer_test.go +++ b/initializer/initializer_test.go @@ -7,7 +7,7 @@ import ( . "github.com/onsi/gomega" "github.com/pkg/errors" - "github.com/sincospro/datatypes/initializer" + "github.com/xoctopus/datatypex/initializer" ) var ( diff --git a/password.go b/password.go index 4e04aa8..72d5583 100644 --- a/password.go +++ b/password.go @@ -1,4 +1,4 @@ -package datatypes +package datatypex const MaskedPassword = "--------" diff --git a/password_test.go b/password_test.go index d13fd20..23607ee 100644 --- a/password_test.go +++ b/password_test.go @@ -1,11 +1,11 @@ -package datatypes_test +package datatypex_test import ( "testing" . "github.com/onsi/gomega" - . "github.com/sincospro/datatypes" + . "github.com/xoctopus/datatypex" ) func TestPassword(t *testing.T) { diff --git a/sfid.go b/sfid.go index 81f080e..b1427a5 100644 --- a/sfid.go +++ b/sfid.go @@ -1,4 +1,4 @@ -package datatypes +package datatypex import "strconv" diff --git a/sfid_test.go b/sfid_test.go index 1cd0957..f5e323b 100644 --- a/sfid_test.go +++ b/sfid_test.go @@ -1,11 +1,11 @@ -package datatypes_test +package datatypex_test import ( "testing" . "github.com/onsi/gomega" - . "github.com/sincospro/datatypes" + . "github.com/xoctopus/datatypex" ) func TestSFID(t *testing.T) { diff --git a/snowflake_id/factory.go b/snowflake_id/factory.go index 13e7d89..e339c70 100644 --- a/snowflake_id/factory.go +++ b/snowflake_id/factory.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/sincospro/datatypes" + "github.com/xoctopus/datatypex" ) func NewSnowflakeFactory(bitsWorkerID, bitsSequence uint32, gap uint32, base time.Time) *SnowflakeFactory { @@ -87,7 +87,7 @@ func (f *SnowflakeFactory) String() string { ) return fmt.Sprintf( "EndAt[%s]_MaxWorker[%d]_MaxSeq[%d]_MaxTs[%d]", - endAt.Format(datatypes.DefaultTimestampLayout), + endAt.Format(datatypex.DefaultTimestampLayout), f.maxWorkerID, f.maxSequence, f.maxTimestamp, ) } diff --git a/snowflake_id/factory_test.go b/snowflake_id/factory_test.go index 621982e..fe56656 100644 --- a/snowflake_id/factory_test.go +++ b/snowflake_id/factory_test.go @@ -6,7 +6,7 @@ import ( . "github.com/onsi/gomega" - . "github.com/sincospro/datatypes/snowflake_id" + . "github.com/xoctopus/datatypex/snowflake_id" ) var ( diff --git a/snowflake_id/snowflake_id_test.go b/snowflake_id/snowflake_id_test.go index 3384646..d245fda 100644 --- a/snowflake_id/snowflake_id_test.go +++ b/snowflake_id/snowflake_id_test.go @@ -9,7 +9,7 @@ import ( . "github.com/onsi/gomega" - . "github.com/sincospro/datatypes/snowflake_id" + . "github.com/xoctopus/datatypex/snowflake_id" ) func NewSnowflakeTestSuite(t *testing.T, n int) *SnowflakeTestSuite { diff --git a/snowflake_id/util_test.go b/snowflake_id/util_test.go index 1205acd..0620a17 100644 --- a/snowflake_id/util_test.go +++ b/snowflake_id/util_test.go @@ -8,7 +8,7 @@ import ( "github.com/agiledragon/gomonkey/v2" . "github.com/onsi/gomega" - . "github.com/sincospro/datatypes/snowflake_id" + . "github.com/xoctopus/datatypex/snowflake_id" ) func TestWorkerIDFromIP(t *testing.T) { diff --git a/timestamp.go b/timestamp.go index 4e27df6..5fb801b 100644 --- a/timestamp.go +++ b/timestamp.go @@ -1,4 +1,4 @@ -package datatypes +package datatypex import ( "database/sql/driver" diff --git a/timestamp_test.go b/timestamp_test.go index abc3551..9c6883d 100644 --- a/timestamp_test.go +++ b/timestamp_test.go @@ -1,4 +1,4 @@ -package datatypes_test +package datatypex_test import ( "strconv" @@ -7,7 +7,7 @@ import ( . "github.com/onsi/gomega" - . "github.com/sincospro/datatypes" + . "github.com/xoctopus/datatypex" ) func TestTimestamp(t *testing.T) { diff --git a/types.go b/types.go index 4f50fb0..42b4e8b 100644 --- a/types.go +++ b/types.go @@ -1,4 +1,4 @@ -package datatypes +package datatypex import ( "database/sql"