From 7aad4a640e645bf0a0081c94d60cbd58edab5331 Mon Sep 17 00:00:00 2001 From: DCjanus Date: Sun, 12 Jan 2025 15:47:23 +0800 Subject: [PATCH] chore: upgrade go version --- .github/workflows/go.yml | 2 +- cmd/kratos/go.mod | 2 +- cmd/kratos/internal/base/mod_test.go | 2 +- cmd/protoc-gen-go-errors/go.mod | 2 +- cmd/protoc-gen-go-http/go.mod | 2 +- contrib/config/apollo/go.mod | 4 +++- contrib/config/consul/go.mod | 4 +++- contrib/config/etcd/go.mod | 4 +++- contrib/config/kubernetes/go.mod | 4 +++- contrib/config/nacos/go.mod | 4 +++- contrib/config/polaris/go.mod | 4 +++- contrib/encoding/msgpack/go.mod | 4 +++- contrib/errortracker/sentry/go.mod | 4 +++- contrib/log/aliyun/go.mod | 4 +++- contrib/log/fluent/go.mod | 4 +++- contrib/log/logrus/go.mod | 4 +++- contrib/log/tencent/go.mod | 4 +++- contrib/log/zap/go.mod | 4 +++- contrib/log/zerolog/go.mod | 4 +++- contrib/opensergo/go.mod | 4 +++- contrib/polaris/go.mod | 4 +++- contrib/registry/consul/go.mod | 4 +++- contrib/registry/discovery/go.mod | 4 +++- contrib/registry/etcd/go.mod | 4 +++- contrib/registry/eureka/go.mod | 4 +++- contrib/registry/kubernetes/go.mod | 4 +++- contrib/registry/nacos/go.mod | 4 +++- contrib/registry/polaris/go.mod | 4 +++- contrib/registry/servicecomb/go.mod | 4 +++- contrib/registry/zookeeper/go.mod | 4 +++- go.mod | 2 +- go.sum | 4 ++++ 32 files changed, 85 insertions(+), 31 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e794e431f37..786787a095e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -13,7 +13,7 @@ jobs: build: strategy: matrix: - go: [ 1.20.x, 1.21.x, 1.22.x ] + go: [ 1.21.x, 1.22.x ] name: build & test runs-on: ubuntu-latest services: diff --git a/cmd/kratos/go.mod b/cmd/kratos/go.mod index 64d03ae4a6b..b4e23b61817 100644 --- a/cmd/kratos/go.mod +++ b/cmd/kratos/go.mod @@ -1,6 +1,6 @@ module github.com/go-kratos/kratos/cmd/kratos/v2 -go 1.19 +go 1.20 require ( github.com/AlecAivazis/survey/v2 v2.3.7 diff --git a/cmd/kratos/internal/base/mod_test.go b/cmd/kratos/internal/base/mod_test.go index da12fd5654c..766c195920b 100644 --- a/cmd/kratos/internal/base/mod_test.go +++ b/cmd/kratos/internal/base/mod_test.go @@ -25,7 +25,7 @@ func TestModulePath(t *testing.T) { mod := `module github.com/go-kratos/kratos/v2 -go 1.19` +go 1.20` _, err = f.WriteString(mod) if err != nil { t.Fatal(err) diff --git a/cmd/protoc-gen-go-errors/go.mod b/cmd/protoc-gen-go-errors/go.mod index 1f5982d4142..e563aa70c89 100644 --- a/cmd/protoc-gen-go-errors/go.mod +++ b/cmd/protoc-gen-go-errors/go.mod @@ -1,6 +1,6 @@ module github.com/go-kratos/kratos/cmd/protoc-gen-go-errors/v2 -go 1.19 +go 1.20 require ( golang.org/x/text v0.3.8 diff --git a/cmd/protoc-gen-go-http/go.mod b/cmd/protoc-gen-go-http/go.mod index a286ceac876..8b7a9a0161d 100644 --- a/cmd/protoc-gen-go-http/go.mod +++ b/cmd/protoc-gen-go-http/go.mod @@ -1,6 +1,6 @@ module github.com/go-kratos/kratos/cmd/protoc-gen-go-http/v2 -go 1.19 +go 1.20 require ( google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd diff --git a/contrib/config/apollo/go.mod b/contrib/config/apollo/go.mod index 7d3596c9ed7..89e5088b355 100644 --- a/contrib/config/apollo/go.mod +++ b/contrib/config/apollo/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/config/apollo/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/apolloconfig/agollo/v4 v4.3.1 diff --git a/contrib/config/consul/go.mod b/contrib/config/consul/go.mod index b4d588909c8..a6131f1bf40 100644 --- a/contrib/config/consul/go.mod +++ b/contrib/config/consul/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/config/consul/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/config/etcd/go.mod b/contrib/config/etcd/go.mod index efb1351eb5f..abc7503900c 100644 --- a/contrib/config/etcd/go.mod +++ b/contrib/config/etcd/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/config/etcd/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/config/kubernetes/go.mod b/contrib/config/kubernetes/go.mod index 1db59c6bc55..3a12f822398 100644 --- a/contrib/config/kubernetes/go.mod +++ b/contrib/config/kubernetes/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/config/kubernetes/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/config/nacos/go.mod b/contrib/config/nacos/go.mod index cfd7bdeb4aa..2f7d5123464 100644 --- a/contrib/config/nacos/go.mod +++ b/contrib/config/nacos/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/config/nacos/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/config/polaris/go.mod b/contrib/config/polaris/go.mod index 1115648735b..6ac4a104f0d 100644 --- a/contrib/config/polaris/go.mod +++ b/contrib/config/polaris/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/config/polaris/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/encoding/msgpack/go.mod b/contrib/encoding/msgpack/go.mod index e1990a56a23..af0ad7a2268 100644 --- a/contrib/encoding/msgpack/go.mod +++ b/contrib/encoding/msgpack/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/encoding/msgpack/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/errortracker/sentry/go.mod b/contrib/errortracker/sentry/go.mod index b8ac1247700..61a6d8e6159 100644 --- a/contrib/errortracker/sentry/go.mod +++ b/contrib/errortracker/sentry/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/errortracker/sentry/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/getsentry/sentry-go v0.25.0 diff --git a/contrib/log/aliyun/go.mod b/contrib/log/aliyun/go.mod index d434fb55846..11b85ddf4a5 100644 --- a/contrib/log/aliyun/go.mod +++ b/contrib/log/aliyun/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/log/aliyun/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/aliyun/aliyun-log-go-sdk v0.1.75 diff --git a/contrib/log/fluent/go.mod b/contrib/log/fluent/go.mod index 10b1abbdd9e..2027554bd4e 100644 --- a/contrib/log/fluent/go.mod +++ b/contrib/log/fluent/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/log/fluent/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/fluent/fluent-logger-golang v1.9.0 diff --git a/contrib/log/logrus/go.mod b/contrib/log/logrus/go.mod index cbb5e897af2..0ee0338f3ae 100644 --- a/contrib/log/logrus/go.mod +++ b/contrib/log/logrus/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/log/logrus/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/log/tencent/go.mod b/contrib/log/tencent/go.mod index 1141256df61..fd243d51803 100644 --- a/contrib/log/tencent/go.mod +++ b/contrib/log/tencent/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/log/tencent/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/log/zap/go.mod b/contrib/log/zap/go.mod index a886a171d17..351025523cc 100644 --- a/contrib/log/zap/go.mod +++ b/contrib/log/zap/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/log/zap/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/log/zerolog/go.mod b/contrib/log/zerolog/go.mod index b99d158088c..3af9c4862cb 100644 --- a/contrib/log/zerolog/go.mod +++ b/contrib/log/zerolog/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/log/zerolog/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/opensergo/go.mod b/contrib/opensergo/go.mod index 7b1225e1bc3..ec6d0b60537 100644 --- a/contrib/opensergo/go.mod +++ b/contrib/opensergo/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/opensergo/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/polaris/go.mod b/contrib/polaris/go.mod index be72efe57b7..30ae4baeec7 100644 --- a/contrib/polaris/go.mod +++ b/contrib/polaris/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/polaris/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/aegis v0.2.0 diff --git a/contrib/registry/consul/go.mod b/contrib/registry/consul/go.mod index 4f7f71af4e8..aa553128b57 100644 --- a/contrib/registry/consul/go.mod +++ b/contrib/registry/consul/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/registry/consul/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/registry/discovery/go.mod b/contrib/registry/discovery/go.mod index a6cae3207d6..fb1ae645b5f 100644 --- a/contrib/registry/discovery/go.mod +++ b/contrib/registry/discovery/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/registry/discovery/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/registry/etcd/go.mod b/contrib/registry/etcd/go.mod index 68bbcf903e3..b31800c17b0 100644 --- a/contrib/registry/etcd/go.mod +++ b/contrib/registry/etcd/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/registry/etcd/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/registry/eureka/go.mod b/contrib/registry/eureka/go.mod index 2a47b223b06..d38481643cd 100644 --- a/contrib/registry/eureka/go.mod +++ b/contrib/registry/eureka/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/registry/eureka/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/registry/kubernetes/go.mod b/contrib/registry/kubernetes/go.mod index bb8828cb0f7..11cd195a272 100644 --- a/contrib/registry/kubernetes/go.mod +++ b/contrib/registry/kubernetes/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/registry/kubernetes/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/registry/nacos/go.mod b/contrib/registry/nacos/go.mod index 44bb2a377e4..9561b49fc32 100644 --- a/contrib/registry/nacos/go.mod +++ b/contrib/registry/nacos/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/registry/nacos/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/registry/polaris/go.mod b/contrib/registry/polaris/go.mod index 49d0b70a8de..d13f7da808c 100644 --- a/contrib/registry/polaris/go.mod +++ b/contrib/registry/polaris/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/registry/polaris/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/contrib/registry/servicecomb/go.mod b/contrib/registry/servicecomb/go.mod index f207fa2ffd9..7c57e3d18de 100644 --- a/contrib/registry/servicecomb/go.mod +++ b/contrib/registry/servicecomb/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/registry/servicecomb/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-chassis/cari v0.6.0 diff --git a/contrib/registry/zookeeper/go.mod b/contrib/registry/zookeeper/go.mod index a083feecc1c..383d8907d9a 100644 --- a/contrib/registry/zookeeper/go.mod +++ b/contrib/registry/zookeeper/go.mod @@ -1,6 +1,8 @@ module github.com/go-kratos/kratos/contrib/registry/zookeeper/v2 -go 1.19 +go 1.21 + +toolchain go1.23.4 require ( github.com/go-kratos/kratos/v2 v2.8.3 diff --git a/go.mod b/go.mod index cceda950568..ba669874b7a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/go-kratos/kratos/v2 -go 1.20 +go 1.21 require ( dario.cat/mergo v1.0.0 diff --git a/go.sum b/go.sum index 6a20c5db483..00afca12d16 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,9 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= +github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cncf/xds/go v0.0.0-20231109132714-523115ebc101 h1:7To3pQ+pZo0i3dsWEbinPNFs5gPSBOsJtx3wTT94VBY= +github.com/cncf/xds/go v0.0.0-20231109132714-523115ebc101/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -9,6 +11,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.11.2-0.20230627204322-7d0032219fcb h1:kxNVXsNro/lpR5WD+P1FI/yUHn2G03Glber3k8cQL2Y= github.com/envoyproxy/go-control-plane v0.11.2-0.20230627204322-7d0032219fcb/go.mod h1:GxGqnjWzl1Gz8WfAfMJSfhvsi4EPZayRb25nLHDWXyA= github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= +github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/go-kratos/aegis v0.2.0 h1:dObzCDWn3XVjUkgxyBp6ZeWtx/do0DPZ7LY3yNSJLUQ= @@ -31,6 +34,7 @@ github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6 github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=