From 42878703d1753fa240b905bddd63bbc166d7a7df Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Thu, 12 Dec 2024 13:16:27 +0800 Subject: [PATCH] update go to 1.21 (#1709) (#1759) --- .github/workflows/build.yaml | 4 +- .github/workflows/release.yaml | 2 +- .github/workflows/test.yaml | 6 +- .github/workflows/upload-e2e-snapshots.yaml | 2 +- .golangci.yml | 10 +- CONTRIBUTING.md | 2 +- cmd/tidb-dashboard/main.go | 2 +- dockerfiles/alpine316.Dockerfile | 2 +- dockerfiles/centos7.Dockerfile | 2 +- go.mod | 48 +++-- go.sum | 211 +++++++------------- pkg/apiserver/apiserver.go | 2 +- pkg/apiserver/clusterinfo/service.go | 2 +- pkg/apiserver/configuration/service.go | 2 +- pkg/apiserver/conprof/service.go | 18 +- pkg/apiserver/debugapi/endpoint/payload.go | 2 +- pkg/apiserver/debugapi/service.go | 2 +- pkg/apiserver/diagnose/report.go | 18 +- pkg/apiserver/diagnose/report_test.go | 24 +-- pkg/apiserver/info/info.go | 2 +- pkg/apiserver/logsearch/task.go | 3 +- pkg/apiserver/metrics/service.go | 2 +- pkg/apiserver/profiling/profile.go | 2 +- pkg/apiserver/profiling/protobuf_to_svg.go | 16 +- pkg/apiserver/profiling/service.go | 2 +- pkg/apiserver/statement/config_test.go | 36 ++-- pkg/apiserver/statement/models.go | 2 +- pkg/apiserver/topsql/service.go | 4 +- pkg/apiserver/user/auth.go | 10 +- pkg/apiserver/user/verify_sql_user_test.go | 20 +- pkg/apiserver/utils/gorm_test.go | 16 +- pkg/apiserver/utils/jwt.go | 2 +- pkg/apiserver/utils/ngm.go | 2 +- pkg/config/config.go | 2 +- pkg/config/dynamic_config_manager.go | 4 +- pkg/keyvisual/decorator/decorator.go | 4 +- pkg/keyvisual/decorator/decorator_test.go | 4 +- pkg/keyvisual/decorator/separator.go | 2 +- pkg/keyvisual/decorator/tidb.go | 4 +- pkg/keyvisual/decorator/tidb_test.go | 4 +- pkg/keyvisual/input/file.go | 2 +- pkg/keyvisual/matrix/average.go | 4 +- pkg/keyvisual/matrix/average_test.go | 4 +- pkg/keyvisual/matrix/axis_test.go | 8 +- pkg/keyvisual/matrix/distance_test.go | 4 +- pkg/keyvisual/matrix/key.go | 6 +- pkg/keyvisual/matrix/key_test.go | 4 +- pkg/keyvisual/matrix/matrix_test.go | 6 +- pkg/keyvisual/matrix/plane_test.go | 4 +- pkg/keyvisual/matrix/util_test.go | 10 +- pkg/keyvisual/region/utils.go | 20 +- pkg/keyvisual/service.go | 6 +- pkg/keyvisual/storage/model_test.go | 64 +++--- pkg/keyvisual/storage/region_test.go | 6 +- pkg/keyvisual/storage/stat_test.go | 6 +- pkg/pd/etcd.go | 2 +- pkg/tidb/client.go | 2 +- pkg/tidb/forwarder.go | 2 +- pkg/tidb/model/codec_test.go | 28 +-- pkg/tidb/proxy.go | 8 +- pkg/tidb/proxy_test.go | 4 +- pkg/tikv/client.go | 2 +- pkg/uiserver/uiserver.go | 2 +- pkg/utils/sys_schema.go | 2 +- pkg/utils/topology/monitor.go | 2 +- pkg/utils/topology/ticdc.go | 2 +- pkg/utils/topology/tidb.go | 2 +- pkg/utils/topology/tiproxy.go | 4 +- pkg/utils/topology/topology.go | 2 +- scripts/go.mod | 41 ++-- scripts/go.sum | 119 +++++++---- scripts/lint.sh | 2 +- tests/integration/diagnose_report_test.go | 8 +- util/client/httpclient/response.go | 2 +- util/client/httpclient/response_test.go | 32 +-- util/client/pdclient/etcd_client.go | 2 +- util/gormutil/virtualview/schema.go | 2 +- util/proxy/proxy.go | 8 +- util/proxy/proxy_test.go | 2 +- util/rest/error_test.go | 2 +- util/rest/fileswap/server.go | 2 +- util/testutil/http_server.go | 6 +- util/topo/mock_TopologyProvider.go | 74 +++++-- util/topo/pdtopo/monitor.go | 2 +- util/topo/pdtopo/provider_pd.go | 2 +- util/topo/pdtopo/std_comp.go | 2 +- util/topo/pdtopo/tidb.go | 2 +- 87 files changed, 528 insertions(+), 504 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5a0abfb16a..7facae64ef 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.18" + go-version: "1.21" - name: Load go module cache uses: actions/cache@v3 with: @@ -62,7 +62,7 @@ jobs: cache-dependency-path: "ui/pnpm-lock.yaml" - uses: actions/setup-go@v3 with: - go-version: "1.18" + go-version: "1.21" - name: Load go module cache uses: actions/cache@v3 with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 03995c8d09..6182f7f9a2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,7 +26,7 @@ jobs: cache-dependency-path: "ui/pnpm-lock.yaml" - uses: actions/setup-go@v3 with: - go-version: "1.18" + go-version: "1.21" - name: Load go module cache uses: actions/cache@v3 with: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ff2d4ceab9..2f59531656 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.18" + go-version: "1.21" - name: Load go module cache uses: actions/cache@v3 with: @@ -54,7 +54,7 @@ jobs: uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: "1.18" + go-version: "1.21" - name: Load go module cache uses: actions/cache@v3 with: @@ -125,7 +125,7 @@ jobs: # ${{ runner.os }}-cypress- # - uses: actions/setup-go@v3 # with: - # go-version: "1.18" + # go-version: "1.21" # - name: Load go module cache # uses: actions/cache@v3 # with: diff --git a/.github/workflows/upload-e2e-snapshots.yaml b/.github/workflows/upload-e2e-snapshots.yaml index 4ee92fd1a5..30935bb7db 100644 --- a/.github/workflows/upload-e2e-snapshots.yaml +++ b/.github/workflows/upload-e2e-snapshots.yaml @@ -45,7 +45,7 @@ jobs: cache-dependency-path: "ui/pnpm-lock.yaml" - uses: actions/setup-go@v3 with: - go-version: "1.18" + go-version: "1.21" - name: Load go module cache uses: actions/cache@v3 with: diff --git a/.golangci.yml b/.golangci.yml index 6c46b4f306..2beb83021d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,8 +1,4 @@ run: - skip-dirs: - - swaggerspec - - pkg/uiserver - - ui timeout: 2m issues: @@ -25,12 +21,16 @@ issues: - text: "G112:" linters: - gosec + exclude-dirs: + - swaggerspec + - pkg/uiserver + - ui linters: enable: # Additionally enable some checkers - asciicheck - - depguard + # - depguard - dogsled - durationcheck - errorlint diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7378249ea6..4f076d64f1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,7 +44,7 @@ The followings are required for developing TiDB Dashboard: - git - Version control - make - Build tool (run common workflows) -- [Golang 1.19+](https://golang.org/) - To compile the server. +- [Golang 1.21+](https://golang.org/) - To compile the server. - [Node.js 18](https://nodejs.org/) - To compile the front-end. - [PNPM 8](https://pnpm.io/) - To manage front-end dependencies. - [Java 8+](https://www.java.com/ES/download/) - To generate JavaScript API client by OpenAPI specification. diff --git a/cmd/tidb-dashboard/main.go b/cmd/tidb-dashboard/main.go index 42f650eeed..cc29b974ce 100755 --- a/cmd/tidb-dashboard/main.go +++ b/cmd/tidb-dashboard/main.go @@ -30,7 +30,7 @@ import ( "github.com/pingcap/log" flag "github.com/spf13/pflag" - "go.etcd.io/etcd/pkg/transport" + "go.etcd.io/etcd/client/pkg/v3/transport" "go.uber.org/zap" "go.uber.org/zap/zapcore" diff --git a/dockerfiles/alpine316.Dockerfile b/dockerfiles/alpine316.Dockerfile index 2927d2d848..d041f16ca9 100644 --- a/dockerfiles/alpine316.Dockerfile +++ b/dockerfiles/alpine316.Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.18-alpine3.16 as builder +FROM golang:1.21-alpine3.16 as builder RUN apk add --no-cache \ make \ diff --git a/dockerfiles/centos7.Dockerfile b/dockerfiles/centos7.Dockerfile index f4584e0716..941b20f4de 100644 --- a/dockerfiles/centos7.Dockerfile +++ b/dockerfiles/centos7.Dockerfile @@ -6,7 +6,7 @@ RUN yum -y groupinstall "Development Tools" # Install golang. ENV PATH /usr/local/go/bin:$PATH RUN export ARCH=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \ - export GO_VERSION=1.19.5 && \ + export GO_VERSION=1.21.12 && \ curl -OL https://golang.org/dl/go$GO_VERSION.linux-$ARCH.tar.gz && \ tar -C /usr/local/ -xzf go$GO_VERSION.linux-$ARCH.tar.gz && \ rm -f go$GO_VERSION.linux-$ARCH.tar.gz diff --git a/go.mod b/go.mod index 71d5619bee..e05e93e9bd 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/pingcap/tidb-dashboard -go 1.18 +go 1.21 require ( github.com/DATA-DOG/go-sqlmock v1.5.0 @@ -22,7 +22,7 @@ require ( github.com/golang-jwt/jwt v3.2.1+incompatible github.com/golang/snappy v0.0.4 github.com/google/pprof v0.0.0-20211122183932-1daafda22083 - github.com/google/uuid v1.0.0 + github.com/google/uuid v1.3.1 github.com/gtank/cryptopasta v0.0.0-20170601214702-1f550f6f2f69 github.com/henrylee2cn/ameda v1.4.10 github.com/jarcoal/httpmock v1.0.8 @@ -41,23 +41,24 @@ require ( github.com/shhdgit/testfixtures/v3 v3.6.2-0.20211219171712-c4f264d673d3 github.com/shurcooL/httpgzip v0.0.0-20190720172056-320755c1c1b0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.3 + github.com/stretchr/testify v1.8.4 github.com/swaggo/http-swagger v1.2.6 github.com/swaggo/swag v1.7.9 github.com/vmihailenco/msgpack/v5 v5.3.5 - go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 + go.etcd.io/etcd/client/pkg/v3 v3.5.15 + go.etcd.io/etcd/client/v3 v3.5.15 go.uber.org/atomic v1.9.0 go.uber.org/fx v1.12.0 go.uber.org/goleak v1.1.10 go.uber.org/zap v1.19.0 - golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be - golang.org/x/sync v0.1.0 - google.golang.org/grpc v1.25.1 - google.golang.org/protobuf v1.30.0 + golang.org/x/oauth2 v0.11.0 + golang.org/x/sync v0.10.0 + google.golang.org/grpc v1.59.0 + google.golang.org/protobuf v1.33.0 gorm.io/datatypes v1.1.0 gorm.io/driver/mysql v1.4.5 - gorm.io/driver/sqlite v1.4.3 - gorm.io/gorm v1.24.3 + gorm.io/driver/sqlite v1.5.7 + gorm.io/gorm v1.25.12 moul.io/zapgorm2 v1.1.0 ) @@ -68,8 +69,8 @@ require ( github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect github.com/bytedance/sonic v1.9.1 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect - github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect - github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf // indirect + github.com/coreos/go-semver v0.3.0 // indirect + github.com/coreos/go-systemd/v22 v22.3.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fogleman/gg v1.3.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect @@ -82,9 +83,9 @@ require ( github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.14.0 // indirect github.com/goccy/go-json v0.10.2 // indirect - github.com/gogo/protobuf v1.3.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect - github.com/golang/protobuf v1.5.0 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect @@ -93,7 +94,7 @@ require ( github.com/leodido/go-urn v1.2.4 // indirect github.com/mailru/easyjson v0.7.6 // indirect github.com/mattn/go-isatty v0.0.19 // indirect - github.com/mattn/go-sqlite3 v1.14.15 // indirect + github.com/mattn/go-sqlite3 v1.14.24 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect @@ -104,19 +105,22 @@ require ( github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + go.etcd.io/etcd/api/v3 v3.5.15 // indirect go.uber.org/dig v1.9.0 // indirect go.uber.org/multierr v1.7.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.9.0 // indirect + golang.org/x/crypto v0.23.0 // indirect golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect golang.org/x/image v0.0.0-20200119044424-58c23975cae1 // indirect golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - golang.org/x/tools v0.6.0 // indirect - google.golang.org/appengine v1.4.0 // indirect - google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.21.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index ae5e132fc4..b5dccdc15f 100644 --- a/go.sum +++ b/go.sum @@ -20,10 +20,8 @@ github.com/Xeoncross/go-aesctr-with-hmac v0.0.0-20200623134604-12b17a7ff502 h1:L github.com/Xeoncross/go-aesctr-with-hmac v0.0.0-20200623134604-12b17a7ff502/go.mod h1:pmnBM9bxWSiHvC/gSWunUIyDvGn33EkP2CUjxFKtTTM= github.com/agiledragon/gomonkey/v2 v2.3.1 h1:k+UnUY0EMNYUFUAQVETGY9uUTxjMdnUkP0ARyJS1zzs= github.com/agiledragon/gomonkey/v2 v2.3.1/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antonmedv/expr v1.9.0 h1:j4HI3NHEdgDnN9p6oI6Ndr0G5QryMY0FNxT4ONrFDGU= @@ -32,10 +30,6 @@ github.com/appleboy/gofight/v2 v2.1.2 h1:VOy3jow4vIK8BRQJoC/I9muxyYlJ2yb9ht2hZoS github.com/appleboy/gofight/v2 v2.1.2/go.mod h1:frW+U1QZEdDgixycTj4CygQ48yLTUhplt43+Wczp3rw= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= @@ -47,7 +41,6 @@ github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/cenkalti/backoff/v4 v4.0.2 h1:JIufpQLbh4DkbQoii76ItQIUFzevQSqOLZca4eamEDs= github.com/cenkalti/backoff/v4 v4.0.2/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= @@ -56,16 +49,12 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f h1:JOrtw2xFKzlg+cbHpyrpLDmnN1HqhBfnX7WDiW7eG2c= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf h1:CAKfRE2YtTUIjjh1bkBtyYFaUT/WmOqsJjgtihT0vMI= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/corona10/goimagehash v1.0.2 h1:pUfB0LnsJASMPGEZLj7tGY251vF+qLGqOgEP4rUs6kA= github.com/corona10/goimagehash v1.0.2/go.mod h1:/l9umBhvcHQXVtQO1V6Gp1yD20STawkhRnnX0D1bvVI= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -77,13 +66,7 @@ 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/denisenkom/go-mssqldb v0.11.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/denisenkom/go-mssqldb v0.12.0 h1:VtrkII767ttSPNRfFekePK3sctr+joXgO58stqQbtUA= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= @@ -102,8 +85,6 @@ github.com/gin-gonic/gin v1.3.0/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6 github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= @@ -116,6 +97,7 @@ github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyr github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= @@ -135,53 +117,42 @@ github.com/goccy/go-graphviz v0.0.9 h1:s/FMMJ1Joj6La3S5ApO3Jk2cwM4LpXECC2muFx3IP github.com/goccy/go-graphviz v0.0.9/go.mod h1:wXVsXxmyMQU6TN3zGRttjNn3h+iCAS7xQFC6TlNvLhk= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= +github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= +github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903 h1:LbsanbbD6LieFkXbj9YNNBupiGHJgFeLpO0j0Fza1h8= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +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/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20211122183932-1daafda22083 h1:c8EUapQFi+kjzedr4c6WqbwMdmB95+oDBWZ5XFHFYxY= github.com/google/pprof v0.0.0-20211122183932-1daafda22083/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c h1:Lh2aW+HnU2Nbe1gqD9SOJLJxW1jBMmQOktN2acDyJk8= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.12.1 h1:zCy2xE9ablevUOrUZc3Dl72Dt+ya2FNAvC2yLYMHzi4= github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/gtank/cryptopasta v0.0.0-20170601214702-1f550f6f2f69 h1:7xsUJsB2NrdcttQPa7JLEaGzvdbk7KvfrjgHZXOQRo0= github.com/gtank/cryptopasta v0.0.0-20170601214702-1f550f6f2f69/go.mod h1:YLEMZOtU+AZ7dhN9T/IpGhXVGly2bvkJQ+zxj3WeVQo= @@ -189,7 +160,6 @@ github.com/henrylee2cn/ameda v1.4.10 h1:JdvI2Ekq7tapdPsuhrc4CaFiqw6QXFvZIULWJgQy github.com/henrylee2cn/ameda v1.4.10/go.mod h1:liZulR8DgHxdK+MEwvZIylGnmcjzQ6N6f2PlWe7nEO4= github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d h1:uGg2frlt3IcT7kbV6LEp5ONv4vmoO2FW4qSO+my/aoM= github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= @@ -200,6 +170,7 @@ github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= github.com/jackc/pgconn v1.13.0 h1:3L1XMNV2Zvca/8BYhzcRFS70Lr0WlDg16Di6SFGAbys= +github.com/jackc/pgconn v1.13.0/go.mod h1:AnowpAqO4CMIIJNZl2VJp+KrkAZciAkhEl0W0JIobpI= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= @@ -213,13 +184,16 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.3.1 h1:nwj7qwf0S+Q7ISFfBndqeLwSwxs+4DPsbRFjECT1Y4Y= +github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= +github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= github.com/jackc/pgtype v1.3.0/go.mod h1:b0JqxHvPmljG+HQ5IsvQ0yqeSi4nGcDTVjFoiLDb0Ik= github.com/jackc/pgtype v1.12.0 h1:Dlq8Qvcch7kiehm8wPGIW0W3KsCCHJnRacKW0UM8n5w= +github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= github.com/jackc/pgx v3.6.2+incompatible h1:2zP5OD7kiyR3xzRYMhOcXVvkDZsImVXfj+yIyTQf3/o= github.com/jackc/pgx v3.6.2+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= @@ -227,6 +201,7 @@ github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9 github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= github.com/jackc/pgx/v4 v4.6.0/go.mod h1:vPh43ZzxijXUVJ+t/EmXBtFmbFVO72cuneCT9oAlxAg= github.com/jackc/pgx/v4 v4.17.2 h1:0Ut0rpeKwvIVbMQ1KbMBU4h6wxehBI535LK6Flheh8E= +github.com/jackc/pgx/v4 v4.17.2/go.mod h1:lcxIZN44yMIrWI78a5CpucdD14hX0SBDbNRvjDBItsw= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= @@ -241,30 +216,23 @@ github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/joomcode/errorx v1.0.1 h1:CalpDWz14ZHd68fIqluJasJosAewpz2TFaJALrUxjrk= github.com/joomcode/errorx v1.0.1/go.mod h1:kgco15ekB6cs+4Xjzo7SPeXzx38PbJzBwbnu9qfVNHQ= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -286,7 +254,6 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -297,15 +264,13 @@ github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2y github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI= -github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mattn/go-sqlite3 v1.14.24 h1:tpSp2G2KyMnnQu99ngJ47EIkWVmliIizyZBfPrBWDRM= +github.com/mattn/go-sqlite3 v1.14.24/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/microsoft/go-mssqldb v0.17.0 h1:Fto83dMZPnYv1Zwx5vHHxpNraeEaUlQ/hhHLgZiaenE= +github.com/microsoft/go-mssqldb v0.17.0/go.mod h1:OkoNGhGEs8EZqchVTtochlXruEhEOaO4S0d2sB5aeGQ= github.com/minio/sio v0.3.0 h1:syEFBewzOMOYVzSTFpp1MqpSZk8rUNbz8VIIc+PNzus= github.com/minio/sio v0.3.0/go.mod h1:8b0yPp2avGThviy/+OCJBI6OMpvxoUuiLvE6F1lebhw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -315,14 +280,12 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5 h1:BvoENQQU+fZ9uukda/RzCAL/191HHwJA5b13R6diVlY= github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oleiade/reflections v1.0.1 h1:D1XO3LVEYroYskEsoSiGItp9RUxG6jWnCVvrqH0HHQM= github.com/oleiade/reflections v1.0.1/go.mod h1:rdFxbxq4QXVZWj0F+e9jqjDkc7dbp97vkRixKo2JR60= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/otiai10/copy v1.7.0 h1:hVoPiN+t+7d2nzzwMiDHPSOogsWAStewq3TwU05+clE= github.com/otiai10/copy v1.7.0/go.mod h1:rmRl6QPdJj6EiUqXQ/4Nn2lLXoNQjFCQbbNrxgc/t3U= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= @@ -346,28 +309,14 @@ github.com/pingcap/log v0.0.0-20210906054005-afc726e70354 h1:SvWCbCPh1YeHd9yQLks github.com/pingcap/log v0.0.0-20210906054005-afc726e70354/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4= github.com/pingcap/tipb v0.0.0-20220718022156-3e2483c20a9e h1:FBaTXU8C3xgt/drM58VHxojHo/QoG1oPsgWTGvaSpO4= github.com/pingcap/tipb v0.0.0-20220718022156-3e2483c20a9e/go.mod h1:A7mrd7WHBl1o63LE2bIBGEJMTNWXqhgmYiOvMLxozfs= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/rivo/tview v0.0.0-20200219210816-cd38d7432498/go.mod h1:6lkG1x+13OShEf0EaOCaTQYyB7d5nSbb181KtjlS+84= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= @@ -386,16 +335,10 @@ github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9Nz github.com/shurcooL/httpgzip v0.0.0-20190720172056-320755c1c1b0 h1:mj/nMDAwTBiaCqMEs4cYCqF7pO6Np7vhy1D1wcQGz+E= github.com/shurcooL/httpgzip v0.0.0-20190720172056-320755c1c1b0/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= 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/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -415,8 +358,9 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2 h1:+iNTcqQJy0OZ5jk6a5NLib47eqXK8uYcPX+O4+cBpEM= github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2/go.mod h1:lKJPbtWzJ9JhsTN1k1gZgleJWY/cqq0psdoMmaThG3w= github.com/swaggo/http-swagger v1.2.6 h1:ihTjChUoSRMpFMjWw+0AkL1Ti4r6v8pCgVYLmQVRlRw= @@ -429,8 +373,6 @@ github.com/tidwall/match v1.0.1 h1:PnKP62LPNxHKTwvHHZZzdOAOCtsJTjo6dZLCwpKm5xc= github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= @@ -438,21 +380,21 @@ github.com/ugorji/go/codec v0.0.0-20181022190402-e5e69e061d4f/go.mod h1:VFNgLljT github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd/api/v3 v3.5.15 h1:3KpLJir1ZEBrYuV2v+Twaa/e2MdDCEZ/70H+lzEiwsk= +go.etcd.io/etcd/api/v3 v3.5.15/go.mod h1:N9EhGzXq58WuMllgH9ZvnEr7SI9pS0k0+DHZezGp7jM= +go.etcd.io/etcd/client/pkg/v3 v3.5.15 h1:fo0HpWz/KlHGMCC+YejpiCmyWDEuIpnTDzpJLB5fWlA= +go.etcd.io/etcd/client/pkg/v3 v3.5.15/go.mod h1:mXDI4NAOwEiszrHCb0aqfAYNCrZP4e9hRca3d1YK8EU= +go.etcd.io/etcd/client/v3 v3.5.15 h1:23M0eY4Fd/inNv1ZfU3AxrbbOdW79r9V9Rl62Nm6ip4= +go.etcd.io/etcd/client/v3 v3.5.15/go.mod h1:CLSJxrYjvLtHsrPKsy7LmZEE+DK2ktfd2bN4RhBMwlU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -485,7 +427,6 @@ go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= @@ -496,8 +437,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 h1:3MTrJm4PyNL9NBqvYDSj3DHl46qQakyfqfWo4jgfaEM= golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= @@ -511,40 +452,43 @@ golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs= +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/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +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/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -565,19 +509,16 @@ golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +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/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 h1:+DCIGbF/swA92ohVg0//6X2IVY3KZs6p9mix0ziNYJM= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -597,48 +538,47 @@ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191114200427-caa0b0f7d508/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20201125231158-b5590deeca9b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210112230658-8b4aab62c064/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c h1:hrpEMCZ2O7DR5gC1n2AJGVhrwiEjOi35+jxtIuZpTMo= google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= -google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -655,19 +595,18 @@ gorm.io/datatypes v1.1.0/go.mod h1:SH2K9R+2RMjuX1CkCONrPwoe9JzVv2hkQvEu4bXGojE= gorm.io/driver/mysql v1.4.5 h1:u1lytId4+o9dDaNcPCFzNv7h6wvmc92UjNk3z8enSBU= gorm.io/driver/mysql v1.4.5/go.mod h1:SxzItlnT1cb6e1e4ZRpgJN2VYtcqJgqnHxWr4wsP8oc= gorm.io/driver/postgres v1.4.5 h1:mTeXTTtHAgnS9PgmhN2YeUbazYpLhUI1doLnw42XUZc= -gorm.io/driver/sqlite v1.4.3 h1:HBBcZSDnWi5BW3B3rwvVTc510KGkBkexlOg0QrmLUuU= -gorm.io/driver/sqlite v1.4.3/go.mod h1:0Aq3iPO+v9ZKbcdiz8gLWRw5VOPcBOPUQJFLq5e2ecI= +gorm.io/driver/postgres v1.4.5/go.mod h1:GKNQYSJ14qvWkvPwXljMGehpKrhlDNsqYRr5HnYGncg= +gorm.io/driver/sqlite v1.5.7 h1:8NvsrhP0ifM7LX9G4zPB97NwovUakUxc+2V2uuf3Z1I= +gorm.io/driver/sqlite v1.5.7/go.mod h1:U+J8craQU6Fzkcvu8oLeAQmi50TkwPEhHDEjQZXDah4= gorm.io/driver/sqlserver v1.4.1 h1:t4r4r6Jam5E6ejqP7N82qAJIJAht27EGT41HyPfXRw0= +gorm.io/driver/sqlserver v1.4.1/go.mod h1:DJ4P+MeZbc5rvY58PnmN1Lnyvb5gw5NPzGshHDnJLig= gorm.io/gorm v1.21.9/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= -gorm.io/gorm v1.24.0/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA= -gorm.io/gorm v1.24.3 h1:WL2ifUmzR/SLp85CSURAfybcHnGZ+yLSGSxgYXlFBHg= -gorm.io/gorm v1.24.3/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA= +gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8= +gorm.io/gorm v1.25.12/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= moul.io/zapgorm2 v1.1.0 h1:qwAlMBYf+qJkJ7PAzJl4oCe6eS6QGiKAXUPeis0+RBE= moul.io/zapgorm2 v1.1.0/go.mod h1:emRfKjNqSzVj5lcgasBdovIXY1jSOwFz2GQZn1Rddks= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/pkg/apiserver/apiserver.go b/pkg/apiserver/apiserver.go index c2a401d575..9382c2fd81 100644 --- a/pkg/apiserver/apiserver.go +++ b/pkg/apiserver/apiserver.go @@ -272,7 +272,7 @@ func newAPIHandlerEngine() (apiHandlerEngine *gin.Engine, endpoint *gin.RouterGr return } -var StoppedHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { +var StoppedHandler = http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusNotFound) _, _ = io.WriteString(w, "Dashboard is not started.\n") }) diff --git a/pkg/apiserver/clusterinfo/service.go b/pkg/apiserver/clusterinfo/service.go index 0debd47028..b5b79fb10f 100644 --- a/pkg/apiserver/clusterinfo/service.go +++ b/pkg/apiserver/clusterinfo/service.go @@ -13,7 +13,7 @@ import ( "time" "github.com/gin-gonic/gin" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/fx" "github.com/pingcap/tidb-dashboard/pkg/apiserver/clusterinfo/hostinfo" diff --git a/pkg/apiserver/configuration/service.go b/pkg/apiserver/configuration/service.go index 9de4ff46b6..17d23d8863 100644 --- a/pkg/apiserver/configuration/service.go +++ b/pkg/apiserver/configuration/service.go @@ -12,7 +12,7 @@ import ( "strconv" "github.com/joomcode/errorx" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/fx" "gorm.io/gorm" diff --git a/pkg/apiserver/conprof/service.go b/pkg/apiserver/conprof/service.go index efb0f560d6..093f125867 100644 --- a/pkg/apiserver/conprof/service.go +++ b/pkg/apiserver/conprof/service.go @@ -8,7 +8,7 @@ import ( "net/http" "github.com/gin-gonic/gin" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/fx" "github.com/pingcap/tidb-dashboard/pkg/apiserver/user" @@ -87,7 +87,7 @@ type NgMonitoringConfig struct { // @Security JwtAuth // @Failure 401 {object} rest.ErrorResponse // @Failure 500 {object} rest.ErrorResponse -func (s *Service) ConprofConfig(c *gin.Context) { +func (s *Service) ConprofConfig(_ *gin.Context) { // dummy, for generate openapi } @@ -98,7 +98,7 @@ func (s *Service) ConprofConfig(c *gin.Context) { // @Success 200 {string} string "ok" // @Failure 401 {object} rest.ErrorResponse // @Failure 500 {object} rest.ErrorResponse -func (s *Service) UpdateConprofConfig(c *gin.Context) { +func (s *Service) UpdateConprofConfig(_ *gin.Context) { // dummy, for generate openapi } @@ -115,7 +115,7 @@ type Component struct { // @Security JwtAuth // @Failure 401 {object} rest.ErrorResponse // @Failure 500 {object} rest.ErrorResponse -func (s *Service) ConprofComponents(c *gin.Context) { +func (s *Service) ConprofComponents(_ *gin.Context) { // dummy, for generate openapi } @@ -130,7 +130,7 @@ type EstimateSizeRes struct { // @Success 200 {object} EstimateSizeRes // @Failure 401 {object} rest.ErrorResponse // @Failure 500 {object} rest.ErrorResponse -func (s *Service) EstimateSize(c *gin.Context) { +func (s *Service) EstimateSize(_ *gin.Context) { // dummy, for generate openapi } @@ -180,7 +180,7 @@ type Target struct { // @Success 200 {array} GroupProfiles // @Failure 401 {object} rest.ErrorResponse // @Failure 500 {object} rest.ErrorResponse -func (s *Service) ConprofGroupProfiles(c *gin.Context) { +func (s *Service) ConprofGroupProfiles(_ *gin.Context) { // dummy, for generate openapi } @@ -191,7 +191,7 @@ func (s *Service) ConprofGroupProfiles(c *gin.Context) { // @Success 200 {object} GroupProfileDetail // @Failure 401 {object} rest.ErrorResponse // @Failure 500 {object} rest.ErrorResponse -func (s *Service) ConprofGroupProfileDetail(c *gin.Context) { +func (s *Service) ConprofGroupProfileDetail(_ *gin.Context) { // dummy, for generate openapi } @@ -219,7 +219,7 @@ func (s *Service) GenConprofActionToken(c *gin.Context) { // @Produce application/x-gzip // @Failure 401 {object} rest.ErrorResponse // @Failure 500 {object} rest.ErrorResponse -func (s *Service) ConprofDownload(c *gin.Context) { +func (s *Service) ConprofDownload(_ *gin.Context) { // dummy, for generate openapi } @@ -248,6 +248,6 @@ type ViewSingleProfileReq struct { // @Produce html // @Failure 401 {object} rest.ErrorResponse // @Failure 500 {object} rest.ErrorResponse -func (s *Service) ConprofViewProfile(c *gin.Context) { +func (s *Service) ConprofViewProfile(_ *gin.Context) { // dummy, for generate openapi } diff --git a/pkg/apiserver/debugapi/endpoint/payload.go b/pkg/apiserver/debugapi/endpoint/payload.go index 9ba1e72a7a..d811fb0d2f 100644 --- a/pkg/apiserver/debugapi/endpoint/payload.go +++ b/pkg/apiserver/debugapi/endpoint/payload.go @@ -12,7 +12,7 @@ import ( "regexp" "strconv" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "github.com/pingcap/tidb-dashboard/pkg/pd" "github.com/pingcap/tidb-dashboard/pkg/utils/topology" diff --git a/pkg/apiserver/debugapi/service.go b/pkg/apiserver/debugapi/service.go index e5f05113f8..fec34afd94 100644 --- a/pkg/apiserver/debugapi/service.go +++ b/pkg/apiserver/debugapi/service.go @@ -9,7 +9,7 @@ import ( "time" "github.com/gin-gonic/gin" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/fx" "github.com/pingcap/tidb-dashboard/pkg/apiserver/debugapi/endpoint" diff --git a/pkg/apiserver/diagnose/report.go b/pkg/apiserver/diagnose/report.go index 70207574e2..06c161eeda 100644 --- a/pkg/apiserver/diagnose/report.go +++ b/pkg/apiserver/diagnose/report.go @@ -302,7 +302,7 @@ func GenerateReportError(errRows []TableRowDef) *TableDef { } } -func GetHeaderTimeTable(startTime, endTime string, db *gorm.DB) (TableDef, error) { +func GetHeaderTimeTable(startTime, endTime string, _ *gorm.DB) (TableDef, error) { return TableDef{ Category: []string{CategoryHeader}, Title: "report_time_range", @@ -716,7 +716,7 @@ func GetTiDBDDLOwner(startTime, endTime string, db *gorm.DB) (TableDef, error) { return table, nil } -func GetPDConfigInfo(startTime, endTime string, db *gorm.DB) (TableDef, error) { +func GetPDConfigInfo(startTime, _ string, db *gorm.DB) (TableDef, error) { table := TableDef{ Category: []string{CategoryConfig}, Title: "scheduler_initial_config", @@ -761,7 +761,7 @@ func GetPDConfigChangeInfo(startTime, endTime string, db *gorm.DB) (TableDef, er return table, nil } -func GetTiDBGCConfigInfo(startTime, endTime string, db *gorm.DB) (TableDef, error) { +func GetTiDBGCConfigInfo(startTime, _ string, db *gorm.DB) (TableDef, error) { table := TableDef{ Category: []string{CategoryConfig}, Title: "tidb_gc_initial_config", @@ -804,7 +804,7 @@ func GetTiDBGCConfigChangeInfo(startTime, endTime string, db *gorm.DB) (TableDef return table, nil } -func GetTiKVRocksDBConfigInfo(startTime, endTime string, db *gorm.DB) (TableDef, error) { +func GetTiKVRocksDBConfigInfo(startTime, _ string, db *gorm.DB) (TableDef, error) { table := TableDef{ Category: []string{CategoryConfig}, Title: "tikv_rocksdb_initial_config", @@ -885,7 +885,7 @@ func GetTiKVRocksDBConfigChangeInfo(startTime, endTime string, db *gorm.DB) (Tab return table, nil } -func GetTiKVRaftStoreConfigInfo(startTime, endTime string, db *gorm.DB) (TableDef, error) { +func GetTiKVRaftStoreConfigInfo(startTime, _ string, db *gorm.DB) (TableDef, error) { table := TableDef{ Category: []string{CategoryConfig}, Title: "tikv_raftstore_initial_config", @@ -1479,7 +1479,7 @@ func GetTiKVErrorTable(startTime, endTime string, db *gorm.DB) (TableDef, error) return table, nil } -func GetTiDBCurrentConfig(startTime, endTime string, db *gorm.DB) (TableDef, error) { +func GetTiDBCurrentConfig(_, _ string, db *gorm.DB) (TableDef, error) { sql := "select `key`,`value` from information_schema.CLUSTER_CONFIG where type='tidb' group by `key`,`value` order by `key`;" table := TableDef{ Category: []string{CategoryConfig}, @@ -1495,7 +1495,7 @@ func GetTiDBCurrentConfig(startTime, endTime string, db *gorm.DB) (TableDef, err return table, nil } -func GetPDCurrentConfig(startTime, endTime string, db *gorm.DB) (TableDef, error) { +func GetPDCurrentConfig(_, _ string, db *gorm.DB) (TableDef, error) { sql := "select `key`,`value` from information_schema.CLUSTER_CONFIG where type='pd' group by `key`,`value` order by `key`;" table := TableDef{ Category: []string{CategoryConfig}, @@ -1511,7 +1511,7 @@ func GetPDCurrentConfig(startTime, endTime string, db *gorm.DB) (TableDef, error return table, nil } -func GetTiKVCurrentConfig(startTime, endTime string, db *gorm.DB) (TableDef, error) { +func GetTiKVCurrentConfig(_, _ string, db *gorm.DB) (TableDef, error) { sql := "select `key`,`value` from information_schema.CLUSTER_CONFIG where type='tikv' group by `key`,`value` order by `key`;" table := TableDef{ Category: []string{CategoryConfig}, @@ -2038,7 +2038,7 @@ func GetPDEtcdStatusTable(startTime, endTime string, db *gorm.DB) (TableDef, err return table, nil } -func GetClusterInfoTable(startTime, endTime string, db *gorm.DB) (TableDef, error) { +func GetClusterInfoTable(_, _ string, db *gorm.DB) (TableDef, error) { sql := "select * from information_schema.cluster_info order by type,start_time desc" table := TableDef{ Category: []string{CategoryHeader}, diff --git a/pkg/apiserver/diagnose/report_test.go b/pkg/apiserver/diagnose/report_test.go index 28ba9754a4..9d97360e3c 100644 --- a/pkg/apiserver/diagnose/report_test.go +++ b/pkg/apiserver/diagnose/report_test.go @@ -5,19 +5,19 @@ package diagnose import ( "testing" - . "github.com/pingcap/check" + "github.com/pingcap/check" ) func TestT(t *testing.T) { - CustomVerboseFlag = true - TestingT(t) + check.CustomVerboseFlag = true + check.TestingT(t) } -var _ = Suite(&testReportSuite{}) +var _ = check.Suite(&testReportSuite{}) type testReportSuite struct{} -func (t *testReportSuite) TestCompareTable(c *C) { +func (t *testReportSuite) TestCompareTable(c *check.C) { table1 := TableDef{ Category: []string{"header"}, Title: "test", @@ -89,19 +89,19 @@ func (t *testReportSuite) TestCompareTable(c *C) { t1.Rows = cas.rows1 t2.Rows = cas.rows2 t, err := compareTable(&t1, &t2, dr) - c.Assert(err, IsNil) - c.Assert(len(t.Rows), Equals, len(cas.out)) + c.Assert(err, check.IsNil) + c.Assert(len(t.Rows), check.Equals, len(cas.out)) for i, row := range t.Rows { - c.Assert(row.Values, DeepEquals, cas.out[i].Values) - c.Assert(len(row.SubValues), Equals, len(cas.out[i].SubValues)) + c.Assert(row.Values, check.DeepEquals, cas.out[i].Values) + c.Assert(len(row.SubValues), check.Equals, len(cas.out[i].SubValues)) for j, subRow := range cas.out[i].SubValues { - c.Assert(subRow, DeepEquals, row.SubValues[j]) + c.Assert(subRow, check.DeepEquals, row.SubValues[j]) } } } } -func (t *testReportSuite) TestRoundFloatString(c *C) { +func (t *testReportSuite) TestRoundFloatString(c *check.C) { cases := []struct { in string out string @@ -123,6 +123,6 @@ func (t *testReportSuite) TestRoundFloatString(c *C) { } for _, cas := range cases { result := RoundFloatString(cas.in) - c.Assert(result, Equals, cas.out) + c.Assert(result, check.Equals, cas.out) } } diff --git a/pkg/apiserver/info/info.go b/pkg/apiserver/info/info.go index 11d775b6ea..d4ac9d2820 100644 --- a/pkg/apiserver/info/info.go +++ b/pkg/apiserver/info/info.go @@ -11,7 +11,7 @@ import ( "github.com/Masterminds/semver" "github.com/gin-gonic/gin" "github.com/samber/lo" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/fx" "github.com/pingcap/tidb-dashboard/pkg/apiserver/user" diff --git a/pkg/apiserver/logsearch/task.go b/pkg/apiserver/logsearch/task.go index 772636b59d..09f04bb07b 100644 --- a/pkg/apiserver/logsearch/task.go +++ b/pkg/apiserver/logsearch/task.go @@ -23,6 +23,7 @@ import ( "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/credentials/insecure" "github.com/pingcap/tidb-dashboard/pkg/apiserver/model" ) @@ -163,7 +164,7 @@ func (t *Task) SyncRun() { return } - secureOpt := grpc.WithInsecure() + secureOpt := grpc.WithTransportCredentials(insecure.NewCredentials()) if t.taskGroup.service.config.ClusterTLSConfig != nil { creds := credentials.NewTLS(t.taskGroup.service.config.ClusterTLSConfig) secureOpt = grpc.WithTransportCredentials(creds) diff --git a/pkg/apiserver/metrics/service.go b/pkg/apiserver/metrics/service.go index 69aae861d6..090a4a9bc1 100644 --- a/pkg/apiserver/metrics/service.go +++ b/pkg/apiserver/metrics/service.go @@ -7,7 +7,7 @@ import ( "time" "github.com/joomcode/errorx" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/atomic" "go.uber.org/fx" "golang.org/x/sync/singleflight" diff --git a/pkg/apiserver/profiling/profile.go b/pkg/apiserver/profiling/profile.go index 6d7b46857f..64e08c56b9 100644 --- a/pkg/apiserver/profiling/profile.go +++ b/pkg/apiserver/profiling/profile.go @@ -8,7 +8,7 @@ import ( "github.com/pingcap/tidb-dashboard/pkg/apiserver/model" ) -func profileAndWritePprof(ctx context.Context, fts *fetchers, target *model.RequestTargetNode, fileNameWithoutExt string, profileDurationSecs uint, profilingType TaskProfilingType) (string, TaskRawDataType, error) { +func profileAndWritePprof(_ context.Context, fts *fetchers, target *model.RequestTargetNode, fileNameWithoutExt string, profileDurationSecs uint, profilingType TaskProfilingType) (string, TaskRawDataType, error) { switch target.Kind { case model.NodeKindTiKV: // TiKV only supports CPU/heap Profiling diff --git a/pkg/apiserver/profiling/protobuf_to_svg.go b/pkg/apiserver/profiling/protobuf_to_svg.go index 5239cde62b..c7bcd6dd94 100644 --- a/pkg/apiserver/profiling/protobuf_to_svg.go +++ b/pkg/apiserver/profiling/protobuf_to_svg.go @@ -27,7 +27,7 @@ func convertProtobufToSVG(content []byte, task TaskModel) ([]byte, error) { return svgContent, nil } -func convertProtobufToDot(content []byte, task TaskModel) ([]byte, error) { +func convertProtobufToDot(content []byte, _ TaskModel) ([]byte, error) { args := []string{ "-dot", // prevent printing stdout @@ -75,7 +75,7 @@ type protobufToDotWriter struct { wc *writeCloser } -func (w *protobufToDotWriter) Open(name string) (io.WriteCloser, error) { +func (w *protobufToDotWriter) Open(_ string) (io.WriteCloser, error) { w.wc = &writeCloser{data: make([]byte, 0)} return w.wc, nil } @@ -98,7 +98,7 @@ type dotFetcher struct { data []byte } -func (f *dotFetcher) Fetch(src string, duration, timeout time.Duration) (*profile.Profile, string, error) { +func (f *dotFetcher) Fetch(_ string, _, _ time.Duration) (*profile.Profile, string, error) { profile, err := profile.ParseData(f.data) return profile, "", err } @@ -122,19 +122,19 @@ func (f *flagSet) Parse(usage func()) []string { return f.Args() } -func (f *flagSet) AddExtraUsage(eu string) {} +func (f *flagSet) AddExtraUsage(_ string) {} // blankPprofUI is used to eliminate the pprof logs. type blankPprofUI struct{} -func (b blankPprofUI) ReadLine(prompt string) (string, error) { +func (b blankPprofUI) ReadLine(_ string) (string, error) { panic("not support") } -func (b blankPprofUI) Print(i ...interface{}) { +func (b blankPprofUI) Print(_ ...interface{}) { } -func (b blankPprofUI) PrintErr(i ...interface{}) { +func (b blankPprofUI) PrintErr(_ ...interface{}) { } func (b blankPprofUI) IsTerminal() bool { @@ -145,5 +145,5 @@ func (b blankPprofUI) WantBrowser() bool { return false } -func (b blankPprofUI) SetAutoComplete(complete func(string) string) { +func (b blankPprofUI) SetAutoComplete(_ func(string) string) { } diff --git a/pkg/apiserver/profiling/service.go b/pkg/apiserver/profiling/service.go index 7b02a325bc..ffdeeee929 100644 --- a/pkg/apiserver/profiling/service.go +++ b/pkg/apiserver/profiling/service.go @@ -9,7 +9,7 @@ import ( "github.com/joomcode/errorx" "github.com/pingcap/log" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/fx" "go.uber.org/zap" diff --git a/pkg/apiserver/statement/config_test.go b/pkg/apiserver/statement/config_test.go index 031c65ec51..6e830c149a 100644 --- a/pkg/apiserver/statement/config_test.go +++ b/pkg/apiserver/statement/config_test.go @@ -5,15 +5,15 @@ package statement import ( "testing" - . "github.com/pingcap/check" + "github.com/pingcap/check" ) func TestT(t *testing.T) { - CustomVerboseFlag = true - TestingT(t) + check.CustomVerboseFlag = true + check.TestingT(t) } -var _ = Suite(&testConfigSuite{}) +var _ = check.Suite(&testConfigSuite{}) type testConfigSuite struct{} @@ -22,14 +22,14 @@ type testConfig struct { RefreshInterval int `json:"refresh_interval" gorm:"column:tidb_stmt_summary_refresh_interval"` } -func (t *testConfigSuite) Test_buildGlobalConfigProjectionSelectSQL_struct_success(c *C) { +func (t *testConfigSuite) Test_buildGlobalConfigProjectionSelectSQL_struct_success(c *check.C) { testConfigStmt := "SELECT @@GLOBAL.tidb_enable_stmt_summary AS tidb_enable_stmt_summary, @@GLOBAL.tidb_stmt_summary_refresh_interval AS tidb_stmt_summary_refresh_interval" - c.Assert(buildGlobalConfigProjectionSelectSQL(testConfig{}), Equals, testConfigStmt) + c.Assert(buildGlobalConfigProjectionSelectSQL(testConfig{}), check.Equals, testConfigStmt) } -func (t *testConfigSuite) Test_buildGlobalConfigProjectionSelectSQL_ptr_success(c *C) { +func (t *testConfigSuite) Test_buildGlobalConfigProjectionSelectSQL_ptr_success(c *check.C) { testConfigStmt := "SELECT @@GLOBAL.tidb_enable_stmt_summary AS tidb_enable_stmt_summary, @@GLOBAL.tidb_stmt_summary_refresh_interval AS tidb_stmt_summary_refresh_interval" - c.Assert(buildGlobalConfigProjectionSelectSQL(&testConfig{}), Equals, testConfigStmt) + c.Assert(buildGlobalConfigProjectionSelectSQL(&testConfig{}), check.Equals, testConfigStmt) } type testConfig2 struct { @@ -37,27 +37,27 @@ type testConfig2 struct { RefreshInterval int `json:"refresh_interval"` } -func (t *testConfigSuite) Test_buildGlobalConfigProjectionSelectSQL_without_gorm_tag(c *C) { +func (t *testConfigSuite) Test_buildGlobalConfigProjectionSelectSQL_without_gorm_tag(c *check.C) { testConfigStmt := "SELECT @@GLOBAL.tidb_enable_stmt_summary AS tidb_enable_stmt_summary" - c.Assert(buildGlobalConfigProjectionSelectSQL(&testConfig2{}), Equals, testConfigStmt) + c.Assert(buildGlobalConfigProjectionSelectSQL(&testConfig2{}), check.Equals, testConfigStmt) } -func (t *testConfigSuite) Test_buildGlobalConfigNamedArgsUpdateSQL_struct_success(c *C) { +func (t *testConfigSuite) Test_buildGlobalConfigNamedArgsUpdateSQL_struct_success(c *check.C) { testConfigStmt := "SET @@GLOBAL.tidb_enable_stmt_summary = @Enable, @@GLOBAL.tidb_stmt_summary_refresh_interval = @RefreshInterval" - c.Assert(buildGlobalConfigNamedArgsUpdateSQL(testConfig{Enable: true, RefreshInterval: 1800}), Equals, testConfigStmt) + c.Assert(buildGlobalConfigNamedArgsUpdateSQL(testConfig{Enable: true, RefreshInterval: 1800}), check.Equals, testConfigStmt) } -func (t *testConfigSuite) Test_buildGlobalConfigNamedArgsUpdateSQL_ptr_success(c *C) { +func (t *testConfigSuite) Test_buildGlobalConfigNamedArgsUpdateSQL_ptr_success(c *check.C) { testConfigStmt := "SET @@GLOBAL.tidb_enable_stmt_summary = @Enable, @@GLOBAL.tidb_stmt_summary_refresh_interval = @RefreshInterval" - c.Assert(buildGlobalConfigNamedArgsUpdateSQL(&testConfig{Enable: true, RefreshInterval: 1800}), Equals, testConfigStmt) + c.Assert(buildGlobalConfigNamedArgsUpdateSQL(&testConfig{Enable: true, RefreshInterval: 1800}), check.Equals, testConfigStmt) } -func (t *testConfigSuite) Test_buildGlobalConfigNamedArgsUpdateSQL_without_gorm_tag(c *C) { +func (t *testConfigSuite) Test_buildGlobalConfigNamedArgsUpdateSQL_without_gorm_tag(c *check.C) { testConfigStmt := "SET @@GLOBAL.tidb_enable_stmt_summary = @Enable" - c.Assert(buildGlobalConfigNamedArgsUpdateSQL(&testConfig2{Enable: true, RefreshInterval: 1800}), Equals, testConfigStmt) + c.Assert(buildGlobalConfigNamedArgsUpdateSQL(&testConfig2{Enable: true, RefreshInterval: 1800}), check.Equals, testConfigStmt) } -func (t *testConfigSuite) Test_buildGlobalConfigNamedArgsUpdateSQL_extract_fields(c *C) { +func (t *testConfigSuite) Test_buildGlobalConfigNamedArgsUpdateSQL_extract_fields(c *check.C) { testConfigStmt := "SET @@GLOBAL.tidb_enable_stmt_summary = @Enable" - c.Assert(buildGlobalConfigNamedArgsUpdateSQL(&testConfig{Enable: true, RefreshInterval: 1800}, "Enable"), Equals, testConfigStmt) + c.Assert(buildGlobalConfigNamedArgsUpdateSQL(&testConfig{Enable: true, RefreshInterval: 1800}, "Enable"), check.Equals, testConfigStmt) } diff --git a/pkg/apiserver/statement/models.go b/pkg/apiserver/statement/models.go index f08d075280..e21366da59 100644 --- a/pkg/apiserver/statement/models.go +++ b/pkg/apiserver/statement/models.go @@ -141,7 +141,7 @@ func (m *Model) checkSupportPlanBinding() bool { return true } -func (m *Model) AfterFind(db *gorm.DB) error { +func (m *Model) AfterFind(_ *gorm.DB) error { if len(m.AggTableNames) > 0 { m.RelatedSchemas = extractSchemasFromTableNames(m.AggTableNames) } diff --git a/pkg/apiserver/topsql/service.go b/pkg/apiserver/topsql/service.go index cbe1ed14cd..6636af309c 100644 --- a/pkg/apiserver/topsql/service.go +++ b/pkg/apiserver/topsql/service.go @@ -70,7 +70,7 @@ type InstanceItem struct { // @Success 200 {object} InstanceResponse "ok" // @Failure 401 {object} rest.ErrorResponse // @Failure 500 {object} rest.ErrorResponse -func (s *Service) GetInstance(c *gin.Context) { +func (s *Service) GetInstance(_ *gin.Context) { // dummy, for generate open api } @@ -117,7 +117,7 @@ type SummaryPlanItem struct { // @Success 200 {object} SummaryResponse "ok" // @Failure 401 {object} rest.ErrorResponse // @Failure 500 {object} rest.ErrorResponse -func (s *Service) GetSummary(c *gin.Context) { +func (s *Service) GetSummary(_ *gin.Context) { // dummy, for generate open api } diff --git a/pkg/apiserver/user/auth.go b/pkg/apiserver/user/auth.go index f944e50050..31250b5758 100644 --- a/pkg/apiserver/user/auth.go +++ b/pkg/apiserver/user/auth.go @@ -70,11 +70,11 @@ func (a BaseAuthenticator) IsEnabled() (bool, error) { return true, nil } -func (a BaseAuthenticator) ProcessSession(u *utils.SessionUser) bool { +func (a BaseAuthenticator) ProcessSession(_ *utils.SessionUser) bool { return true } -func (a BaseAuthenticator) SignOutInfo(u *utils.SessionUser, redirectURL string) (*SignOutInfo, error) { +func (a BaseAuthenticator) SignOutInfo(_ *utils.SessionUser, _ string) (*SignOutInfo, error) { return &SignOutInfo{}, nil } @@ -188,7 +188,7 @@ func NewAuthService(featureFlags *featureflag.Registry) *AuthService { return &user }, - Authorizator: func(data interface{}, c *gin.Context) bool { + Authorizator: func(data interface{}, _ *gin.Context) bool { // Ensure identity is valid if data == nil { return false @@ -211,10 +211,10 @@ func NewAuthService(featureFlags *featureflag.Registry) *AuthService { rest.Error(c, err) return err.Error() }, - Unauthorized: func(c *gin.Context, code int, message string) { + Unauthorized: func(c *gin.Context, code int, _ string) { c.Status(code) }, - LoginResponse: func(c *gin.Context, code int, token string, expire time.Time) { + LoginResponse: func(c *gin.Context, _ int, token string, expire time.Time) { c.JSON(http.StatusOK, TokenResponse{ Token: token, Expire: expire, diff --git a/pkg/apiserver/user/verify_sql_user_test.go b/pkg/apiserver/user/verify_sql_user_test.go index dfb311785f..349be33c40 100755 --- a/pkg/apiserver/user/verify_sql_user_test.go +++ b/pkg/apiserver/user/verify_sql_user_test.go @@ -5,19 +5,19 @@ package user import ( "testing" - . "github.com/pingcap/check" + "github.com/pingcap/check" ) func TestT(t *testing.T) { - CustomVerboseFlag = true - TestingT(t) + check.CustomVerboseFlag = true + check.TestingT(t) } -var _ = Suite(&testVerifySQLUserSuite{}) +var _ = check.Suite(&testVerifySQLUserSuite{}) type testVerifySQLUserSuite struct{} -func (t *testVerifySQLUserSuite) Test_parseUserGrants(c *C) { +func (t *testVerifySQLUserSuite) Test_parseUserGrants(c *check.C) { cases := []struct { desc string input []string @@ -70,11 +70,11 @@ func (t *testVerifySQLUserSuite) Test_parseUserGrants(c *C) { for i, v := range cases { actual := parseUserGrants(v.input) - c.Assert(actual, DeepEquals, v.expected, Commentf("parse %s (index: %d) failed", v.desc, i)) + c.Assert(actual, check.DeepEquals, v.expected, check.Commentf("parse %s (index: %d) failed", v.desc, i)) } } -func (t *testVerifySQLUserSuite) Test_checkDashboardPriv(c *C) { +func (t *testVerifySQLUserSuite) Test_checkDashboardPriv(c *check.C) { cases := []struct { desc string grants []string @@ -158,11 +158,11 @@ func (t *testVerifySQLUserSuite) Test_checkDashboardPriv(c *C) { grants[grant] = struct{}{} } actual := checkDashboardPriv(grants, v.enableSEM) - c.Assert(actual, DeepEquals, v.expected, Commentf("check %s (index: %d) failed", v.desc, i)) + c.Assert(actual, check.DeepEquals, v.expected, check.Commentf("check %s (index: %d) failed", v.desc, i)) } } -func (t *testVerifySQLUserSuite) Test_checkWriteablePriv(c *C) { +func (t *testVerifySQLUserSuite) Test_checkWriteablePriv(c *check.C) { cases := []struct { desc string grants []string @@ -216,6 +216,6 @@ func (t *testVerifySQLUserSuite) Test_checkWriteablePriv(c *C) { grants[grant] = struct{}{} } actual := checkWriteablePriv(grants) - c.Assert(actual, DeepEquals, v.expected, Commentf("check %s (index: %d) failed", v.desc, i)) + c.Assert(actual, check.DeepEquals, v.expected, check.Commentf("check %s (index: %d) failed", v.desc, i)) } } diff --git a/pkg/apiserver/utils/gorm_test.go b/pkg/apiserver/utils/gorm_test.go index 60a430c07c..e822699e1c 100644 --- a/pkg/apiserver/utils/gorm_test.go +++ b/pkg/apiserver/utils/gorm_test.go @@ -5,20 +5,20 @@ package utils import ( "testing" - . "github.com/pingcap/check" + "github.com/pingcap/check" ) func TestT(t *testing.T) { - CustomVerboseFlag = true - TestingT(t) + check.CustomVerboseFlag = true + check.TestingT(t) } -var _ = Suite(&testGormSuite{}) +var _ = check.Suite(&testGormSuite{}) type testGormSuite struct{} -func (t *testGormSuite) Test_GetGormColumnName(c *C) { - c.Assert(GetGormColumnName(`column:db`), Equals, `db`) - c.Assert(GetGormColumnName(`primaryKey;index`), Equals, ``) - c.Assert(GetGormColumnName(`column:db;primaryKey;index`), Equals, `db`) +func (t *testGormSuite) Test_GetGormColumnName(c *check.C) { + c.Assert(GetGormColumnName(`column:db`), check.Equals, `db`) + c.Assert(GetGormColumnName(`primaryKey;index`), check.Equals, ``) + c.Assert(GetGormColumnName(`column:db;primaryKey;index`), check.Equals, `db`) } diff --git a/pkg/apiserver/utils/jwt.go b/pkg/apiserver/utils/jwt.go index 0afc1cb362..7c06fd522f 100644 --- a/pkg/apiserver/utils/jwt.go +++ b/pkg/apiserver/utils/jwt.go @@ -46,7 +46,7 @@ func NewJWTStringWithExpire(issuer string, data string, expireIn time.Duration) // ParseJWTString parse the JWT string and return the raw data. func ParseJWTString(requiredIssuer string, tokenStr string) (string, error) { claims := &Claims{} - token, err := jwt.ParseWithClaims(tokenStr, claims, func(token *jwt.Token) (interface{}, error) { + token, err := jwt.ParseWithClaims(tokenStr, claims, func(_ *jwt.Token) (interface{}, error) { return hmacSampleSecret[:], nil }) if err != nil { diff --git a/pkg/apiserver/utils/ngm.go b/pkg/apiserver/utils/ngm.go index df3c50ea30..8bcd5a25f1 100644 --- a/pkg/apiserver/utils/ngm.go +++ b/pkg/apiserver/utils/ngm.go @@ -14,7 +14,7 @@ import ( "github.com/gin-gonic/gin" "github.com/joomcode/errorx" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/fx" "golang.org/x/sync/singleflight" diff --git a/pkg/config/config.go b/pkg/config/config.go index 6b4669af85..1d5071587d 100755 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -7,7 +7,7 @@ import ( "net/url" "strings" - "go.etcd.io/etcd/pkg/transport" + "go.etcd.io/etcd/client/pkg/v3/transport" "github.com/pingcap/tidb-dashboard/pkg/utils/version" ) diff --git a/pkg/config/dynamic_config_manager.go b/pkg/config/dynamic_config_manager.go index d8438dcb3c..69b75b1505 100644 --- a/pkg/config/dynamic_config_manager.go +++ b/pkg/config/dynamic_config_manager.go @@ -11,7 +11,7 @@ import ( "github.com/cenkalti/backoff/v4" "github.com/joomcode/errorx" "github.com/pingcap/log" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/fx" "go.uber.org/zap" ) @@ -86,7 +86,7 @@ func (m *DynamicConfigManager) Start(ctx context.Context) error { return nil } -func (m *DynamicConfigManager) Stop(ctx context.Context) error { +func (m *DynamicConfigManager) Stop(_ context.Context) error { m.mu.Lock() defer m.mu.Unlock() for _, ch := range m.pushChannels { diff --git a/pkg/keyvisual/decorator/decorator.go b/pkg/keyvisual/decorator/decorator.go index 3551531660..af552fa775 100644 --- a/pkg/keyvisual/decorator/decorator.go +++ b/pkg/keyvisual/decorator/decorator.go @@ -39,14 +39,14 @@ type naiveLabelStrategy struct{} type naiveLabeler struct{} -func (s naiveLabelStrategy) ReloadConfig(cfg *config.KeyVisualConfig) {} +func (s naiveLabelStrategy) ReloadConfig(_ *config.KeyVisualConfig) {} func (s naiveLabelStrategy) NewLabeler() Labeler { return naiveLabeler{} } // CrossBorder always returns false. So naiveLabelStrategy believes that there are no cross-border situations. -func (e naiveLabeler) CrossBorder(startKey, endKey string) bool { +func (e naiveLabeler) CrossBorder(_, _ string) bool { return false } diff --git a/pkg/keyvisual/decorator/decorator_test.go b/pkg/keyvisual/decorator/decorator_test.go index f879faf726..8596d6d52d 100644 --- a/pkg/keyvisual/decorator/decorator_test.go +++ b/pkg/keyvisual/decorator/decorator_test.go @@ -5,9 +5,9 @@ package decorator import ( "testing" - . "github.com/pingcap/check" + "github.com/pingcap/check" ) func TestDecorator(t *testing.T) { - TestingT(t) + check.TestingT(t) } diff --git a/pkg/keyvisual/decorator/separator.go b/pkg/keyvisual/decorator/separator.go index 31763918cd..876a890b6d 100644 --- a/pkg/keyvisual/decorator/separator.go +++ b/pkg/keyvisual/decorator/separator.go @@ -40,7 +40,7 @@ func (s *separatorLabelStrategy) NewLabeler() Labeler { } // CrossBorder is temporarily not considering cross-border logic. -func (e *separatorLabeler) CrossBorder(startKey, endKey string) bool { +func (e *separatorLabeler) CrossBorder(_, _ string) bool { return false } diff --git a/pkg/keyvisual/decorator/tidb.go b/pkg/keyvisual/decorator/tidb.go index 1cea2b5184..df011e71cf 100644 --- a/pkg/keyvisual/decorator/tidb.go +++ b/pkg/keyvisual/decorator/tidb.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/fx" "github.com/pingcap/tidb-dashboard/pkg/config" @@ -62,7 +62,7 @@ type tidbLabeler struct { Buffer model.KeyInfoBuffer } -func (s *tidbLabelStrategy) ReloadConfig(cfg *config.KeyVisualConfig) {} +func (s *tidbLabelStrategy) ReloadConfig(_ *config.KeyVisualConfig) {} func (s *tidbLabelStrategy) Background(ctx context.Context) { ticker := time.NewTicker(time.Minute) diff --git a/pkg/keyvisual/decorator/tidb_test.go b/pkg/keyvisual/decorator/tidb_test.go index 51b7d27b50..3e3990a643 100644 --- a/pkg/keyvisual/decorator/tidb_test.go +++ b/pkg/keyvisual/decorator/tidb_test.go @@ -3,9 +3,9 @@ package decorator import ( - . "github.com/pingcap/check" + "github.com/pingcap/check" ) -var _ = Suite(&testTiDBSuite{}) +var _ = check.Suite(&testTiDBSuite{}) type testTiDBSuite struct{} diff --git a/pkg/keyvisual/input/file.go b/pkg/keyvisual/input/file.go index 6f1416abe5..0c58393365 100644 --- a/pkg/keyvisual/input/file.go +++ b/pkg/keyvisual/input/file.go @@ -35,7 +35,7 @@ func (input *fileInput) GetStartTime() time.Time { return input.Now.Add(input.StartTime.Sub(input.EndTime)) } -func (input *fileInput) Background(ctx context.Context, stat *storage.Stat) { +func (input *fileInput) Background(_ context.Context, stat *storage.Stat) { log.Info("keyvisual load files from", zap.Time("start-time", input.StartTime)) fileTime := input.StartTime for !fileTime.After(input.EndTime) { diff --git a/pkg/keyvisual/matrix/average.go b/pkg/keyvisual/matrix/average.go index d6748f6613..7f452b4580 100644 --- a/pkg/keyvisual/matrix/average.go +++ b/pkg/keyvisual/matrix/average.go @@ -11,11 +11,11 @@ type averageSplitStrategy struct{} type averageSplitter struct{} -func (averageSplitStrategy) NewSplitter(chunks []chunk, compactKeys []string) Splitter { +func (averageSplitStrategy) NewSplitter(_ []chunk, _ []string) Splitter { return averageSplitter{} } -func (averageSplitter) Split(dst, src chunk, tag splitTag, axesIndex int) { +func (averageSplitter) Split(dst, src chunk, tag splitTag, _ int) { CheckPartOf(dst.Keys, src.Keys) if len(dst.Keys) == len(src.Keys) { diff --git a/pkg/keyvisual/matrix/average_test.go b/pkg/keyvisual/matrix/average_test.go index 3d5168c900..60f212cf6e 100644 --- a/pkg/keyvisual/matrix/average_test.go +++ b/pkg/keyvisual/matrix/average_test.go @@ -3,9 +3,9 @@ package matrix import ( - . "github.com/pingcap/check" + "github.com/pingcap/check" ) -var _ = Suite(&testAverageSuite{}) +var _ = check.Suite(&testAverageSuite{}) type testAverageSuite struct{} diff --git a/pkg/keyvisual/matrix/axis_test.go b/pkg/keyvisual/matrix/axis_test.go index 1630b99041..9d41e5b0a6 100644 --- a/pkg/keyvisual/matrix/axis_test.go +++ b/pkg/keyvisual/matrix/axis_test.go @@ -3,14 +3,14 @@ package matrix import ( - . "github.com/pingcap/check" + "github.com/pingcap/check" ) -var _ = Suite(&testAxisSuite{}) +var _ = check.Suite(&testAxisSuite{}) type testAxisSuite struct{} -func (s *testAxisSuite) TestChunkReduce(c *C) { +func (s *testAxisSuite) TestChunkReduce(c *check.C) { testcases := []struct { keys []string values []uint64 @@ -34,6 +34,6 @@ func (s *testAxisSuite) TestChunkReduce(c *C) { for _, testcase := range testcases { originChunk := createChunk(testcase.keys, testcase.values) reduceChunk := originChunk.Reduce(testcase.newKeys) - c.Assert(reduceChunk.Values, DeepEquals, testcase.newValues) + c.Assert(reduceChunk.Values, check.DeepEquals, testcase.newValues) } } diff --git a/pkg/keyvisual/matrix/distance_test.go b/pkg/keyvisual/matrix/distance_test.go index 128c4ff813..414f945059 100644 --- a/pkg/keyvisual/matrix/distance_test.go +++ b/pkg/keyvisual/matrix/distance_test.go @@ -12,11 +12,11 @@ import ( "sync" "testing" - . "github.com/pingcap/check" + "github.com/pingcap/check" "go.uber.org/fx" ) -var _ = Suite(&testDistanceSuite{}) +var _ = check.Suite(&testDistanceSuite{}) type testDistanceSuite struct{} diff --git a/pkg/keyvisual/matrix/key.go b/pkg/keyvisual/matrix/key.go index 8e946b5c12..af54222d11 100644 --- a/pkg/keyvisual/matrix/key.go +++ b/pkg/keyvisual/matrix/key.go @@ -3,9 +3,7 @@ package matrix import ( - "reflect" "sync" - "unsafe" ) // KeyMap is used for string intern. @@ -29,7 +27,5 @@ func (km *KeyMap) SaveKeys(keys []string) { } func equal(keyA, keyB string) bool { - pA := (*reflect.StringHeader)(unsafe.Pointer(&keyA)) // #nosec - pB := (*reflect.StringHeader)(unsafe.Pointer(&keyB)) // #nosec - return pA.Data == pB.Data && pA.Len == pB.Len + return keyA == keyB } diff --git a/pkg/keyvisual/matrix/key_test.go b/pkg/keyvisual/matrix/key_test.go index d2eb7898d2..e85ea221ec 100644 --- a/pkg/keyvisual/matrix/key_test.go +++ b/pkg/keyvisual/matrix/key_test.go @@ -3,9 +3,9 @@ package matrix import ( - . "github.com/pingcap/check" + "github.com/pingcap/check" ) -var _ = Suite(&testKeySuite{}) +var _ = check.Suite(&testKeySuite{}) type testKeySuite struct{} diff --git a/pkg/keyvisual/matrix/matrix_test.go b/pkg/keyvisual/matrix/matrix_test.go index 6252249591..c01c93a188 100644 --- a/pkg/keyvisual/matrix/matrix_test.go +++ b/pkg/keyvisual/matrix/matrix_test.go @@ -5,13 +5,13 @@ package matrix import ( "testing" - . "github.com/pingcap/check" + "github.com/pingcap/check" ) func TestMatrix(t *testing.T) { - TestingT(t) + check.TestingT(t) } -var _ = Suite(&testMatrixSuite{}) +var _ = check.Suite(&testMatrixSuite{}) type testMatrixSuite struct{} diff --git a/pkg/keyvisual/matrix/plane_test.go b/pkg/keyvisual/matrix/plane_test.go index 73724149c4..3219453ec7 100644 --- a/pkg/keyvisual/matrix/plane_test.go +++ b/pkg/keyvisual/matrix/plane_test.go @@ -3,9 +3,9 @@ package matrix import ( - . "github.com/pingcap/check" + "github.com/pingcap/check" ) -var _ = Suite(&testPlaneSuite{}) +var _ = check.Suite(&testPlaneSuite{}) type testPlaneSuite struct{} diff --git a/pkg/keyvisual/matrix/util_test.go b/pkg/keyvisual/matrix/util_test.go index 649b162aa9..ce1518e2c9 100644 --- a/pkg/keyvisual/matrix/util_test.go +++ b/pkg/keyvisual/matrix/util_test.go @@ -3,14 +3,14 @@ package matrix import ( - . "github.com/pingcap/check" + "github.com/pingcap/check" ) -var _ = Suite(&testUtilSuite{}) +var _ = check.Suite(&testUtilSuite{}) type testUtilSuite struct{} -func (s *testUtilSuite) TestMemset(c *C) { +func (s *testUtilSuite) TestMemset(c *check.C) { s1 := []uint64{3, 3, 3, 3, 3} s2 := []uint64{0, 0, 0, 0, 0} s3 := []int{6, 6, 6, 6} @@ -19,6 +19,6 @@ func (s *testUtilSuite) TestMemset(c *C) { MemsetUint64(s1, 0) MemsetInt(s3, 9) - c.Assert(s1, DeepEquals, s2) - c.Assert(s3, DeepEquals, s4) + c.Assert(s1, check.DeepEquals, s2) + c.Assert(s3, check.DeepEquals, s4) } diff --git a/pkg/keyvisual/region/utils.go b/pkg/keyvisual/region/utils.go index 860911f8e2..ce16d4189b 100644 --- a/pkg/keyvisual/region/utils.go +++ b/pkg/keyvisual/region/utils.go @@ -3,31 +3,21 @@ package region import ( - "reflect" "unsafe" ) // String converts slice of bytes to string without copy. -func String(b []byte) (s string) { +func String(b []byte) string { if len(b) == 0 { return "" } - pbytes := (*reflect.SliceHeader)(unsafe.Pointer(&b)) // #nosec - pstring := (*reflect.StringHeader)(unsafe.Pointer(&s)) // #nosec - pstring.Data = pbytes.Data - pstring.Len = pbytes.Len - return + return unsafe.String(&b[0], len(b)) // #nosec } // Bytes converts a string into a byte slice. Need to make sure that the byte slice is not modified. -func Bytes(s string) (b []byte) { +func Bytes(s string) []byte { if len(s) == 0 { - return + return nil } - pbytes := (*reflect.SliceHeader)(unsafe.Pointer(&b)) // #nosec - pstring := (*reflect.StringHeader)(unsafe.Pointer(&s)) // #nosec - pbytes.Data = pstring.Data - pbytes.Len = pstring.Len - pbytes.Cap = pstring.Len - return + return unsafe.Slice(unsafe.StringData(s), len(s)) // #nosec } diff --git a/pkg/keyvisual/service.go b/pkg/keyvisual/service.go index 59ce82d6f0..69cda8814e 100644 --- a/pkg/keyvisual/service.go +++ b/pkg/keyvisual/service.go @@ -14,7 +14,7 @@ import ( "github.com/gin-gonic/gin" "github.com/joomcode/errorx" "github.com/pingcap/log" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/fx" "go.uber.org/zap" @@ -298,7 +298,7 @@ func (s *Service) provideLocals() (*config.Config, *clientv3.Client, *pd.Client, func newWaitGroup(lc fx.Lifecycle) *sync.WaitGroup { wg := &sync.WaitGroup{} lc.Append(fx.Hook{ - OnStop: func(ctx context.Context) error { + OnStop: func(_ context.Context) error { wg.Wait() return nil }, @@ -321,7 +321,7 @@ func newStrategy(lc fx.Lifecycle, wg *sync.WaitGroup, labelStrategy decorator.La func newStat( lc fx.Lifecycle, wg *sync.WaitGroup, - etcdClient *clientv3.Client, + _ *clientv3.Client, db *dbstore.DB, in input.StatInput, strategy *matrix.Strategy, diff --git a/pkg/keyvisual/storage/model_test.go b/pkg/keyvisual/storage/model_test.go index 13c5f67f44..e0899f7537 100644 --- a/pkg/keyvisual/storage/model_test.go +++ b/pkg/keyvisual/storage/model_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - . "github.com/pingcap/check" + "github.com/pingcap/check" "gorm.io/driver/sqlite" "gorm.io/gorm" @@ -16,17 +16,17 @@ import ( ) func TestDbstore(t *testing.T) { - TestingT(t) + check.TestingT(t) } -var _ = Suite(&testDbstoreSuite{}) +var _ = check.Suite(&testDbstoreSuite{}) type testDbstoreSuite struct { dir string db *dbstore.DB } -func (t *testDbstoreSuite) SetUpTest(c *C) { +func (t *testDbstoreSuite) SetUpTest(c *check.C) { t.dir = c.MkDir() gormDB, err := gorm.Open(sqlite.Open(path.Join(t.dir, "test.sqlite.db"))) if err != nil { @@ -35,16 +35,16 @@ func (t *testDbstoreSuite) SetUpTest(c *C) { t.db = &dbstore.DB{DB: gormDB} } -func (t *testDbstoreSuite) TestCreateTableAxisModelIfNotExists(c *C) { +func (t *testDbstoreSuite) TestCreateTableAxisModelIfNotExists(c *check.C) { isExist, err := CreateTableAxisModelIfNotExists(t.db) - c.Assert(isExist, Equals, false) - c.Assert(err, IsNil) + c.Assert(isExist, check.Equals, false) + c.Assert(err, check.IsNil) isExist, err = CreateTableAxisModelIfNotExists(t.db) - c.Assert(isExist, Equals, true) - c.Assert(err, IsNil) + c.Assert(isExist, check.Equals, true) + c.Assert(err, check.IsNil) } -func (t *testDbstoreSuite) TestClearTableAxisModel(c *C) { +func (t *testDbstoreSuite) TestClearTableAxisModel(c *check.C) { _, err := CreateTableAxisModelIfNotExists(t.db) if err != nil { c.Fatalf("Create table AxisModel error: %v", err) @@ -63,19 +63,19 @@ func (t *testDbstoreSuite) TestClearTableAxisModel(c *C) { if err != nil { c.Fatalf("Count table AxisModel error: %v", err) } - c.Assert(count, Equals, int64(1)) + c.Assert(count, check.Equals, int64(1)) err = ClearTableAxisModel(t.db) - c.Assert(err, IsNil) + c.Assert(err, check.IsNil) err = t.db.Table(tableAxisModelName).Count(&count).Error if err != nil { c.Fatalf("Count table AxisModel error: %v", err) } - c.Assert(count, Equals, int64(0)) + c.Assert(count, check.Equals, int64(0)) } -func (t *testDbstoreSuite) TestAxisModelFunc(c *C) { +func (t *testDbstoreSuite) TestAxisModelFunc(c *check.C) { _, err := CreateTableAxisModelIfNotExists(t.db) if err != nil { c.Fatalf("Create table AxisModel error: %v", err) @@ -91,34 +91,34 @@ func (t *testDbstoreSuite) TestAxisModelFunc(c *C) { c.Fatalf("NewAxisModel error: %v", err) } err = axisModel.Insert(t.db) - c.Assert(err, IsNil) + c.Assert(err, check.IsNil) axisModels, err := FindAxisModelsOrderByTime(t.db, layerNum) if err != nil { c.Fatalf("FindAxisModelOrderByTime error: %v", err) } - c.Assert(len(axisModels), Equals, 1) + c.Assert(len(axisModels), check.Equals, 1) axisModelDeepEqual(axisModels[0], axisModel, c) obtainedAxis, err := axisModels[0].UnmarshalAxis() if err != nil { c.Fatalf("UnmarshalAxis error: %v", err) } - c.Assert(obtainedAxis, DeepEquals, axis) + c.Assert(obtainedAxis, check.DeepEquals, axis) err = axisModel.Delete(t.db) - c.Assert(err, IsNil) + c.Assert(err, check.IsNil) var count int64 err = t.db.Table(tableAxisModelName).Count(&count).Error if err != nil { c.Fatalf("Count table AxisModel error: %v", err) } - c.Assert(count, Equals, int64(0)) + c.Assert(count, check.Equals, int64(0)) err = axisModel.Delete(t.db) - c.Assert(err, IsNil) + c.Assert(err, check.IsNil) } -func (t *testDbstoreSuite) TestAxisModelsFindAndDelete(c *C) { +func (t *testDbstoreSuite) TestAxisModelsFindAndDelete(c *check.C) { _, err := CreateTableAxisModelIfNotExists(t.db) if err != nil { c.Fatalf("Create table AxisModel error: %v", err) @@ -146,36 +146,36 @@ func (t *testDbstoreSuite) TestAxisModelsFindAndDelete(c *C) { if err != nil { c.Fatalf("Count table AxisModel error: %v", err) } - c.Assert(count, Equals, int64(int(maxLayerNum)*axisModelNumEachLayer)) + c.Assert(count, check.Equals, int64(int(maxLayerNum)*axisModelNumEachLayer)) findLayerNum := maxLayerNum - 1 axisModels, err := FindAxisModelsOrderByTime(t.db, findLayerNum) - c.Assert(err, IsNil) + c.Assert(err, check.IsNil) axisModelsDeepEqual(axisModels, axisModelList[findLayerNum], c) err = DeleteAxisModelsByLayerNum(t.db, findLayerNum) - c.Assert(err, IsNil) + c.Assert(err, check.IsNil) axisModels, err = FindAxisModelsOrderByTime(t.db, findLayerNum) - c.Assert(err, IsNil) - c.Assert(axisModels, HasLen, 0) + c.Assert(err, check.IsNil) + c.Assert(axisModels, check.HasLen, 0) err = t.db.Table(tableAxisModelName).Count(&count).Error if err != nil { c.Fatalf("Count table AxisModel error: %v", err) } - c.Assert(count, Equals, int64(int(maxLayerNum-1)*axisModelNumEachLayer)) + c.Assert(count, check.Equals, int64(int(maxLayerNum-1)*axisModelNumEachLayer)) } -func axisModelsDeepEqual(obtainedAxisModels []*AxisModel, expectedAxisModels []*AxisModel, c *C) { - c.Assert(len(obtainedAxisModels), Equals, len(expectedAxisModels)) +func axisModelsDeepEqual(obtainedAxisModels []*AxisModel, expectedAxisModels []*AxisModel, c *check.C) { + c.Assert(len(obtainedAxisModels), check.Equals, len(expectedAxisModels)) for i := range obtainedAxisModels { axisModelDeepEqual(obtainedAxisModels[i], expectedAxisModels[i], c) } } -func axisModelDeepEqual(obtainedAxisModel *AxisModel, expectedAxisModel *AxisModel, c *C) { - c.Assert(obtainedAxisModel.Time.Unix(), Equals, expectedAxisModel.Time.Unix()) +func axisModelDeepEqual(obtainedAxisModel *AxisModel, expectedAxisModel *AxisModel, c *check.C) { + c.Assert(obtainedAxisModel.Time.Unix(), check.Equals, expectedAxisModel.Time.Unix()) obtainedAxisModel.Time = expectedAxisModel.Time - c.Assert(obtainedAxisModel, DeepEquals, expectedAxisModel) + c.Assert(obtainedAxisModel, check.DeepEquals, expectedAxisModel) } diff --git a/pkg/keyvisual/storage/region_test.go b/pkg/keyvisual/storage/region_test.go index 96402804dd..e9c5fce646 100644 --- a/pkg/keyvisual/storage/region_test.go +++ b/pkg/keyvisual/storage/region_test.go @@ -5,13 +5,13 @@ package storage import ( "testing" - . "github.com/pingcap/check" + "github.com/pingcap/check" ) func TestRegion(t *testing.T) { - TestingT(t) + check.TestingT(t) } -var _ = Suite(&testRegionSuite{}) +var _ = check.Suite(&testRegionSuite{}) type testRegionSuite struct{} diff --git a/pkg/keyvisual/storage/stat_test.go b/pkg/keyvisual/storage/stat_test.go index c1cc5be464..8548fbda97 100644 --- a/pkg/keyvisual/storage/stat_test.go +++ b/pkg/keyvisual/storage/stat_test.go @@ -5,13 +5,13 @@ package storage import ( "testing" - . "github.com/pingcap/check" + "github.com/pingcap/check" ) func TestStat(t *testing.T) { - TestingT(t) + check.TestingT(t) } -var _ = Suite(&testStatSuite{}) +var _ = check.Suite(&testStatSuite{}) type testStatSuite struct{} diff --git a/pkg/pd/etcd.go b/pkg/pd/etcd.go index e4d3d9889c..a94bed4239 100644 --- a/pkg/pd/etcd.go +++ b/pkg/pd/etcd.go @@ -7,7 +7,7 @@ import ( "time" "github.com/pingcap/log" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/fx" "go.uber.org/zap" diff --git a/pkg/tidb/client.go b/pkg/tidb/client.go index dfd5b5b782..63576a0404 100644 --- a/pkg/tidb/client.go +++ b/pkg/tidb/client.go @@ -16,7 +16,7 @@ import ( "github.com/VividCortex/mysqlerr" "github.com/go-sql-driver/mysql" "github.com/pingcap/log" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/fx" "go.uber.org/zap" mysqlDriver "gorm.io/driver/mysql" diff --git a/pkg/tidb/forwarder.go b/pkg/tidb/forwarder.go index 88d07e9ccf..c7e43d460f 100644 --- a/pkg/tidb/forwarder.go +++ b/pkg/tidb/forwarder.go @@ -11,7 +11,7 @@ import ( "github.com/cenkalti/backoff/v4" "github.com/pingcap/log" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/fx" "github.com/pingcap/tidb-dashboard/pkg/utils/topology" diff --git a/pkg/tidb/model/codec_test.go b/pkg/tidb/model/codec_test.go index 69bd5bdd89..1022496e19 100644 --- a/pkg/tidb/model/codec_test.go +++ b/pkg/tidb/model/codec_test.go @@ -5,32 +5,32 @@ package model import ( "testing" - . "github.com/pingcap/check" + "github.com/pingcap/check" ) func TestTable(t *testing.T) { - TestingT(t) + check.TestingT(t) } -var _ = Suite(&testCodecSuite{}) +var _ = check.Suite(&testCodecSuite{}) type testCodecSuite struct{} -func (s *testCodecSuite) TestDecodeBytes(c *C) { +func (s *testCodecSuite) TestDecodeBytes(c *check.C) { key := "abcdefghijklmnopqrstuvwxyz" for i := 0; i < len(key); i++ { _, k, err := decodeBytes(encodeBytes([]byte(key[:i])), nil) - c.Assert(err, IsNil) - c.Assert(string(k), Equals, key[:i]) + c.Assert(err, check.IsNil) + c.Assert(string(k), check.Equals, key[:i]) } } -func (s *testCodecSuite) TestTiDBInfo(c *C) { +func (s *testCodecSuite) TestTiDBInfo(c *check.C) { buf := new(KeyInfoBuffer) // no encode _, err := buf.DecodeKey([]byte("t\x80\x00\x00\x00\x00\x00\x00\xff")) - c.Assert(err, NotNil) + c.Assert(err, check.NotNil) testcases := []struct { Key string @@ -101,14 +101,14 @@ func (s *testCodecSuite) TestTiDBInfo(c *C) { for _, t := range testcases { key := encodeBytes([]byte(t.Key)) _, err := buf.DecodeKey(key) - c.Assert(err, IsNil) + c.Assert(err, check.IsNil) isMeta, tableID := buf.MetaOrTable() - c.Assert(isMeta, Equals, t.IsMeta) - c.Assert(tableID, Equals, t.TableID) + c.Assert(isMeta, check.Equals, t.IsMeta) + c.Assert(tableID, check.Equals, t.TableID) isCommonHandle, rowID := buf.RowInfo() - c.Assert(isCommonHandle, Equals, t.IsCommonHandle) - c.Assert(rowID, Equals, t.RowID) + c.Assert(isCommonHandle, check.Equals, t.IsCommonHandle) + c.Assert(rowID, check.Equals, t.RowID) indexID := buf.IndexInfo() - c.Assert(indexID, Equals, t.IndexID) + c.Assert(indexID, check.Equals, t.IndexID) } } diff --git a/pkg/tidb/proxy.go b/pkg/tidb/proxy.go index 3a2effa7b3..e1b2d2ea4a 100644 --- a/pkg/tidb/proxy.go +++ b/pkg/tidb/proxy.go @@ -75,7 +75,7 @@ func (p *proxy) port() int { func (p *proxy) updateRemotes(remotes map[string]struct{}) { if len(remotes) == 0 { - p.remotes.Range(func(key, value interface{}) bool { + p.remotes.Range(func(key, _ interface{}) bool { p.remotes.Delete(key) return true }) @@ -93,7 +93,7 @@ func (p *proxy) updateRemotes(remotes map[string]struct{}) { } } // remove old remote - p.remotes.Range(func(key, value interface{}) bool { + p.remotes.Range(func(key, _ interface{}) bool { addr := key.(string) if _, ok := remotes[addr]; !ok { log.Debug("proxy discards remote", zap.String("remote", addr)) @@ -182,7 +182,7 @@ func (p *proxy) doCheck(ctx context.Context) { case <-ctx.Done(): return case <-time.After(p.checkInterval): - p.remotes.Range(func(key, value interface{}) bool { + p.remotes.Range(func(_, value interface{}) bool { rmt := value.(*remote) if rmt.isActive() { return true @@ -203,7 +203,7 @@ func (p *proxy) doCheck(ctx context.Context) { func (p *proxy) run(ctx context.Context) { endpoints := make([]string, 0) - p.remotes.Range(func(key, value interface{}) bool { + p.remotes.Range(func(_, value interface{}) bool { r := value.(*remote) endpoints = append(endpoints, r.addr) return true diff --git a/pkg/tidb/proxy_test.go b/pkg/tidb/proxy_test.go index e360624f4c..72ac7af785 100644 --- a/pkg/tidb/proxy_test.go +++ b/pkg/tidb/proxy_test.go @@ -24,7 +24,7 @@ func TestProxy(t *testing.T) { } defer l.Close() want := "hello proxy" - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, err := w.Write([]byte(want)) if err != nil { t.Fatal(err) @@ -66,7 +66,7 @@ func TestProxyPick(t *testing.T) { var currentPicked int for i := 0; i < n; i++ { idx := i - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { picked[idx] = true currentPicked = idx _, err := w.Write([]byte(responseData)) diff --git a/pkg/tikv/client.go b/pkg/tikv/client.go index b7dda05946..dc34f47f43 100644 --- a/pkg/tikv/client.go +++ b/pkg/tikv/client.go @@ -11,7 +11,7 @@ import ( "strconv" "time" - "go.etcd.io/etcd/pkg/transport" + "go.etcd.io/etcd/client/pkg/v3/transport" "go.uber.org/fx" "github.com/pingcap/tidb-dashboard/pkg/config" diff --git a/pkg/uiserver/uiserver.go b/pkg/uiserver/uiserver.go index 0538f1cd75..28e6b9fba4 100644 --- a/pkg/uiserver/uiserver.go +++ b/pkg/uiserver/uiserver.go @@ -137,7 +137,7 @@ func Handler(root http.FileSystem) http.Handler { return httpgzip.FileServer(root, httpgzip.FileServerOptions{IndexHTML: true}) } - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + return http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, _ = io.WriteString(w, "Dashboard UI is not built. Use `UI=1 make`.\n") }) } diff --git a/pkg/utils/sys_schema.go b/pkg/utils/sys_schema.go index 442a51cd08..2d2501daf5 100644 --- a/pkg/utils/sys_schema.go +++ b/pkg/utils/sys_schema.go @@ -24,7 +24,7 @@ func ProvideSysSchema(lc fx.Lifecycle) *SysSchema { s := NewSysSchema() lc.Append(fx.Hook{ - OnStop: func(ctx context.Context) error { + OnStop: func(_ context.Context) error { return s.Close() }, }) diff --git a/pkg/utils/topology/monitor.go b/pkg/utils/topology/monitor.go index 323559fc01..33d44df712 100644 --- a/pkg/utils/topology/monitor.go +++ b/pkg/utils/topology/monitor.go @@ -9,7 +9,7 @@ import ( "time" "github.com/pingcap/log" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" "github.com/pingcap/tidb-dashboard/util/distro" diff --git a/pkg/utils/topology/ticdc.go b/pkg/utils/topology/ticdc.go index 46e4024b93..abc3947c08 100644 --- a/pkg/utils/topology/ticdc.go +++ b/pkg/utils/topology/ticdc.go @@ -10,7 +10,7 @@ import ( "strings" "github.com/pingcap/log" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" "github.com/pingcap/tidb-dashboard/util/distro" diff --git a/pkg/utils/topology/tidb.go b/pkg/utils/topology/tidb.go index d448f1f873..073485fb29 100644 --- a/pkg/utils/topology/tidb.go +++ b/pkg/utils/topology/tidb.go @@ -12,7 +12,7 @@ import ( "time" "github.com/pingcap/log" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" "github.com/pingcap/tidb-dashboard/util/distro" diff --git a/pkg/utils/topology/tiproxy.go b/pkg/utils/topology/tiproxy.go index 029b8c708d..80ea949420 100644 --- a/pkg/utils/topology/tiproxy.go +++ b/pkg/utils/topology/tiproxy.go @@ -11,7 +11,7 @@ import ( "strings" "github.com/pingcap/log" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" "github.com/pingcap/tidb-dashboard/util/distro" @@ -95,7 +95,7 @@ func FetchTiProxyTopology(ctx context.Context, etcdClient *clientv3.Client) ([]T return nodes, nil } -func parseTiProxyInfo(address string, value []byte) (*TiProxyInfo, error) { +func parseTiProxyInfo(_ string, value []byte) (*TiProxyInfo, error) { ds := struct { GitHash string `json:"git_hash"` Version string `json:"version"` diff --git a/pkg/utils/topology/topology.go b/pkg/utils/topology/topology.go index 9bbba37986..4b72a3e6b4 100644 --- a/pkg/utils/topology/topology.go +++ b/pkg/utils/topology/topology.go @@ -9,7 +9,7 @@ import ( "github.com/joomcode/errorx" "github.com/pingcap/log" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" "github.com/pingcap/tidb-dashboard/util/distro" diff --git a/scripts/go.mod b/scripts/go.mod index 34d0a57d7f..36878fa5b0 100644 --- a/scripts/go.mod +++ b/scripts/go.mod @@ -1,6 +1,6 @@ module scripts -go 1.18 +go 1.21 require ( github.com/codeskyblue/go-sh v0.0.0-20200712050446-30169cf553fe @@ -9,15 +9,17 @@ require ( github.com/pingcap/tidb-dashboard v0.0.0-00010101000000-000000000000 github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 github.com/swaggo/swag v1.7.9 - github.com/vektra/mockery/v2 v2.14.1 - go.uber.org/zap v1.19.0 - golang.org/x/mod v0.8.0 + github.com/vektra/mockery/v2 v2.40.3 + go.uber.org/zap v1.21.0 + golang.org/x/mod v0.17.0 ) require ( github.com/KyleBanks/depth v1.2.1 // indirect github.com/PuerkitoBio/purell v1.1.1 // indirect github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect + github.com/benbjohnson/clock v1.1.0 // indirect + github.com/chigopher/pathlib v0.19.1 // indirect github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect @@ -27,37 +29,38 @@ require ( github.com/go-openapi/spec v0.20.4 // indirect github.com/go-openapi/swag v0.19.15 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/huandu/xstrings v1.4.0 // indirect + github.com/iancoleman/strcase v0.2.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jinzhu/copier v0.3.5 // indirect github.com/josharian/intern v1.0.0 // indirect - github.com/magiconair/properties v1.8.6 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.6 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/rs/zerolog v1.28.0 // indirect + github.com/rs/zerolog v1.29.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect - github.com/spf13/afero v1.9.2 // indirect + github.com/spf13/afero v1.9.3 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/cobra v1.6.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.13.0 // indirect - github.com/subosito/gotenv v1.4.1 // indirect + github.com/spf13/viper v1.15.0 // indirect + github.com/subosito/gotenv v1.4.2 // indirect github.com/urfave/cli/v2 v2.3.0 // indirect go.uber.org/atomic v1.9.0 // indirect - go.uber.org/multierr v1.7.0 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - golang.org/x/tools v0.6.0 // indirect + go.uber.org/multierr v1.8.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.20.0 // indirect + golang.org/x/text v0.21.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/scripts/go.sum b/scripts/go.sum index f0b999bb6b..ea63dcc2e1 100644 --- a/scripts/go.sum +++ b/scripts/go.sum @@ -46,11 +46,16 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/agiledragon/gomonkey/v2 v2.3.1 h1:k+UnUY0EMNYUFUAQVETGY9uUTxjMdnUkP0ARyJS1zzs= +github.com/agiledragon/gomonkey/v2 v2.3.1/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= +github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chigopher/pathlib v0.19.1 h1:RoLlUJc0CqBGwq239cilyhxPNLXTK+HXoASGyGznx5A= +github.com/chigopher/pathlib v0.19.1/go.mod h1:tzC1dZLW8o33UQpWkNkhvPwL5n4yyFRFm/jL1YGWFvY= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -76,14 +81,18 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -98,9 +107,13 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= +github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -138,7 +151,8 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +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/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -161,27 +175,38 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= +github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= +github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= +github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= @@ -200,18 +225,20 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/otiai10/copy v1.7.0 h1:hVoPiN+t+7d2nzzwMiDHPSOogsWAStewq3TwU05+clE= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/otiai10/copy v1.7.0/go.mod h1:rmRl6QPdJj6EiUqXQ/4Nn2lLXoNQjFCQbbNrxgc/t3U= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pingcap/errors v0.11.0/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pingcap/errors v0.11.5-0.20200917111840-a15ef68f753d h1:TH18wFO5Nq/zUQuWu9ms2urgZnLP69XJYiI2JZAkUGc= +github.com/pingcap/errors v0.11.5-0.20200917111840-a15ef68f753d/go.mod h1:g4vx//d6VakjJ0mk7iLBlKA8LFavV/sAVINT/1PFxeQ= github.com/pingcap/log v0.0.0-20210906054005-afc726e70354 h1:SvWCbCPh1YeHd9yQLksvJYAgft6wLTY1aNG81tpyscQ= github.com/pingcap/log v0.0.0-20210906054005-afc726e70354/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -223,9 +250,10 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= -github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= +github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w= +github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -234,8 +262,8 @@ github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 h1:pXY9qYc/MP5zdvqWEUH6SjNiu7VhSjuVFTFiTcphaLU= github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= +github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= @@ -244,8 +272,8 @@ github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmq github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= -github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= +github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= +github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= @@ -258,22 +286,26 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= -github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= +github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/swaggo/swag v1.7.9 h1:6vCG5mm43ebDzGlZPMGYrYI4zKFfOr5kicQX8qjeDwc= github.com/swaggo/swag v1.7.9/go.mod h1:gZ+TJ2w/Ve1RwQsA2IRoSOTidHz6DX+PIG8GWvbnoLU= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/vektra/mockery/v2 v2.14.1 h1:Xamr4zUkFBDGdZhJ6iCiJ1AwkGRmUgZd8zkwjRXt+TU= -github.com/vektra/mockery/v2 v2.14.1/go.mod h1:bnD1T8tExSgPD1ripLkDbr60JA9VtQeu12P3wgLZd7M= +github.com/vektra/mockery/v2 v2.40.3 h1:IZ2lydSDFsY0khnEsbSu13VLcqSsa6UYSS/8F+uOJmo= +github.com/vektra/mockery/v2 v2.40.3/go.mod h1:KYBZF/7sqOa86BaOZPYsoCZWEWLS90a5oBLg2pVudxY= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -283,14 +315,18 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/zap v1.19.0 h1:mZQZefskPPCMIBCSEH0v2/iUqqLrYtaeqwD6FUGUnFE= +go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= +golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -298,8 +334,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -322,7 +358,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -334,8 +369,9 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -367,9 +403,10 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +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/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -389,7 +426,9 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -422,19 +461,21 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +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/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -443,8 +484,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -496,8 +537,9 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -590,7 +632,8 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= diff --git a/scripts/lint.sh b/scripts/lint.sh index fc8bcd2ca9..a0200299f6 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -10,7 +10,7 @@ PROJECT_DIR="$(dirname "$DIR")" cd $PROJECT_DIR LINT_BIN=./bin/golangci-lint -REQUIRED_VERSION=1.51.1 +REQUIRED_VERSION=1.59.1 NEED_DOWNLOAD=true echo "+ Check golangci-lint binary" diff --git a/tests/integration/diagnose_report_test.go b/tests/integration/diagnose_report_test.go index 3243644519..e5669ff23f 100644 --- a/tests/integration/diagnose_report_test.go +++ b/tests/integration/diagnose_report_test.go @@ -5,15 +5,15 @@ package integration import ( "testing" - . "github.com/pingcap/check" + "github.com/pingcap/check" ) func TestT(t *testing.T) { - CustomVerboseFlag = true - TestingT(t) + check.CustomVerboseFlag = true + check.TestingT(t) } -var _ = Suite(&testReportSuite{}) +var _ = check.Suite(&testReportSuite{}) type testReportSuite struct{} diff --git a/util/client/httpclient/response.go b/util/client/httpclient/response.go index 993f0e7f3b..f7733a2bb7 100644 --- a/util/client/httpclient/response.go +++ b/util/client/httpclient/response.go @@ -72,7 +72,7 @@ func (lResp *LazyResponse) doExecutionOnce() { client.SetRedirectPolicy(resty.FlexibleRedirectPolicy(10)) client.SetTimeout(defaultTimeout) if lResp.requestSnapshot.debugTag != "" { - client.SetPreRequestHook(func(rc *resty.Client, rr *http.Request) error { + client.SetPreRequestHook(func(_ *resty.Client, rr *http.Request) error { log.Info("Send request", zap.String("kindTag", lResp.requestSnapshot.kindTag), zap.String("debugTag", lResp.requestSnapshot.debugTag), diff --git a/util/client/httpclient/response_test.go b/util/client/httpclient/response_test.go index 2426a831ec..9b736d37b5 100644 --- a/util/client/httpclient/response_test.go +++ b/util/client/httpclient/response_test.go @@ -26,7 +26,7 @@ func TestReadBodyAsString(t *testing.T) { requestTimes := atomic.Int32{} responseStatus := atomic.Int32{} - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { requestTimes.Inc() w.WriteHeader(int(responseStatus.Load())) _, _ = fmt.Fprintf(w, "Basically OK, Req #%d", requestTimes.Load()) @@ -106,7 +106,7 @@ func TestFinish(t *testing.T) { requestTimes := atomic.Int32{} responseStatus := atomic.Int32{} - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { requestTimes.Inc() w.WriteHeader(int(responseStatus.Load())) _, _ = fmt.Fprintf(w, "Basically OK, Req #%d", requestTimes.Load()) @@ -161,7 +161,7 @@ func TestFinish(t *testing.T) { } func TestReadBodyAsJSON(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, _ = fmt.Fprintln(w, `{"foo":"bar"}`) })) defer ts.Close() @@ -191,7 +191,7 @@ func TestReadBodyAsJSON(t *testing.T) { func TestReadBodyAsJSON_UnmarshalFailure(t *testing.T) { requestTimes := atomic.Int32{} - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { requestTimes.Inc() _, _ = fmt.Fprintln(w, `bad_json`) })) @@ -241,7 +241,7 @@ func (w *myWriter) Write(p []byte) (int, error) { func TestPipeBody(t *testing.T) { requestTimes := atomic.Int32{} - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { requestTimes.Inc() _, _ = fmt.Fprintln(w, "Hello world") })) @@ -273,7 +273,7 @@ func TestPipeBody(t *testing.T) { // Now the server write data chunk by chunk... ctx, cancel := context.WithCancel(context.Background()) - ts = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { requestTimes.Inc() _, _ = w.Write([]byte("Partial...")) w.(http.Flusher).Flush() @@ -324,7 +324,7 @@ func TestPipeBody(t *testing.T) { } func TestResponseHeader(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.Header().Add("foo", "bar") w.WriteHeader(http.StatusAlreadyReported) _, _ = fmt.Fprintln(w, "Fine!") @@ -340,12 +340,12 @@ func TestResponseHeader(t *testing.T) { } func TestSetURL(t *testing.T) { - ts1 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts1 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, _ = fmt.Fprintln(w, "Result from server 1") })) defer ts1.Close() - ts2 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts2 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, _ = fmt.Fprintln(w, "Result from server 2") })) defer ts2.Close() @@ -397,12 +397,12 @@ func TestLR(t *testing.T) { } func TestGet(t *testing.T) { - ts1 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts1 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, _ = fmt.Fprintln(w, "Result from server 1") })) defer ts1.Close() - ts2 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts2 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, _ = fmt.Fprintln(w, "Result from server 2") })) defer ts2.Close() @@ -564,7 +564,7 @@ func TestFailureStatusCode(t *testing.T) { requestTimes := atomic.Int32{} responseStatus := atomic.Int32{} - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { requestTimes.Inc() w.WriteHeader(int(responseStatus.Load())) _, _ = fmt.Fprintf(w, "Fail from req #%d", requestTimes.Load()) @@ -750,11 +750,11 @@ func TestConnectionReuse(t *testing.T) { closedConn := atomic.Int32{} requestTimes := atomic.Int32{} - ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { requestTimes.Inc() _, _ = fmt.Fprintf(w, "Req #%d", requestTimes.Load()) })) - ts.Config.ConnState = func(c net.Conn, cs http.ConnState) { + ts.Config.ConnState = func(_ net.Conn, cs http.ConnState) { switch cs { case http.StateNew: newConn.Inc() @@ -840,7 +840,7 @@ func TestClone(t *testing.T) { func TestTimeoutHeader(t *testing.T) { requestTimes := atomic.Int32{} ctx, cancel := context.WithCancel(context.Background()) - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { requestTimes.Inc() select { case <-ctx.Done(): @@ -903,7 +903,7 @@ func TestTimeoutHeader(t *testing.T) { func TestTimeoutBody(t *testing.T) { requestTimes := atomic.Int32{} ctx, cancel := context.WithCancel(context.Background()) - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { requestTimes.Inc() _, _ = w.Write([]byte("Partial...")) w.(http.Flusher).Flush() diff --git a/util/client/pdclient/etcd_client.go b/util/client/pdclient/etcd_client.go index 511dc33029..fbde026592 100644 --- a/util/client/pdclient/etcd_client.go +++ b/util/client/pdclient/etcd_client.go @@ -8,7 +8,7 @@ import ( "time" "github.com/pingcap/log" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/backoff" diff --git a/util/gormutil/virtualview/schema.go b/util/gormutil/virtualview/schema.go index aa1076aba4..ac06c80137 100644 --- a/util/gormutil/virtualview/schema.go +++ b/util/gormutil/virtualview/schema.go @@ -69,7 +69,7 @@ type identVisitor struct { idents []string } -func (v *identVisitor) Enter(node *ast.Node) {} +func (v *identVisitor) Enter(_ *ast.Node) {} func (v *identVisitor) Exit(node *ast.Node) { if n, ok := (*node).(*ast.IdentifierNode); ok { v.idents = append(v.idents, n.Value) diff --git a/util/proxy/proxy.go b/util/proxy/proxy.go index 697069e254..df529f4b8c 100644 --- a/util/proxy/proxy.go +++ b/util/proxy/proxy.go @@ -95,7 +95,7 @@ func (p *Proxy) SetUpstreams(addresses []string) { if len(addresses) == 0 { log.Debug("All endpoints are removed from the upstream list", zap.String("kindTag", p.config.KindTag)) - p.upstreams.Range(func(key, value interface{}) bool { + p.upstreams.Range(func(key, _ interface{}) bool { p.upstreams.Delete(key) return true }) @@ -119,7 +119,7 @@ func (p *Proxy) SetUpstreams(addresses []string) { for _, addr := range addresses { addrSet[addr] = struct{}{} } - p.upstreams.Range(func(key, value interface{}) bool { + p.upstreams.Range(func(key, _ interface{}) bool { addr := key.(string) if _, ok := addrSet[addr]; !ok { log.Debug("An endpoint is removed from the upstream list", @@ -207,7 +207,7 @@ func (p *Proxy) pickOneLastActiveUpstream() *upstream { } var picked *upstream - p.upstreams.Range(func(key, value interface{}) bool { + p.upstreams.Range(func(_, value interface{}) bool { r := value.(*upstream) if r.IsActive() { picked = r @@ -222,7 +222,7 @@ func (p *Proxy) pickOneLastActiveUpstream() *upstream { func (p *Proxy) probeActiveUpstreams() { activeUpstreams := 0 - p.upstreams.Range(func(key, value interface{}) bool { + p.upstreams.Range(func(_, value interface{}) bool { r := value.(*upstream) if r.IsActive() { activeUpstreams++ diff --git a/util/proxy/proxy_test.go b/util/proxy/proxy_test.go index ff0fa36d59..8181524328 100644 --- a/util/proxy/proxy_test.go +++ b/util/proxy/proxy_test.go @@ -284,7 +284,7 @@ func TestBrokenServer(t *testing.T) { require.NoError(t, err) defer p.Close() - server := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + server := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, _ = fmt.Fprintln(w, "foo") })) defer server.Close() diff --git a/util/rest/error_test.go b/util/rest/error_test.go index 2df61be866..0d0e7e41f1 100644 --- a/util/rest/error_test.go +++ b/util/rest/error_test.go @@ -151,7 +151,7 @@ func (suite *ErrorHandlerFnTestSuite) TestWithRecoveryMiddleware() { engine := gin.New() engine.Use(gin.Recovery()) engine.Use(ErrorHandlerFn()) - engine.GET("/test", func(c *gin.Context) { + engine.GET("/test", func(_ *gin.Context) { panic("some panic") }) diff --git a/util/rest/fileswap/server.go b/util/rest/fileswap/server.go index 7808ca6445..1f4995b2ab 100644 --- a/util/rest/fileswap/server.go +++ b/util/rest/fileswap/server.go @@ -69,7 +69,7 @@ func (s *Handler) parseClaimsFromToken(tokenString string) (*downloadTokenClaims token, err := jwt.ParseWithClaims( tokenString, &downloadTokenClaims{}, - func(token *jwt.Token) (interface{}, error) { + func(_ *jwt.Token) (interface{}, error) { return s.secret, nil }) if token != nil { diff --git a/util/testutil/http_server.go b/util/testutil/http_server.go index dfa1845c17..0842ad8495 100644 --- a/util/testutil/http_server.go +++ b/util/testutil/http_server.go @@ -16,7 +16,7 @@ func GetHTTPServerHost(server *httptest.Server) string { } func NewHTTPServer(response string) *httptest.Server { - return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, _ = fmt.Fprintln(w, response) })) } @@ -28,7 +28,7 @@ func NewHTTPServerAtHost(response string, host string) *httptest.Server { } server := &httptest.Server{ Listener: l, - Config: &http.Server{Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { // nolint:gosec + Config: &http.Server{Handler: http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { // nolint:gosec _, _ = fmt.Fprintln(w, response) })}, } @@ -49,7 +49,7 @@ func NewMultiServer(n int, responsePattern string) *MultiServerHelper { for i := 0; i < n; i++ { func(i int) { - s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { resp := fmt.Sprintf(responsePattern, i) lastActiveID.Store(int32(i)) lastResponse.Store(resp) diff --git a/util/topo/mock_TopologyProvider.go b/util/topo/mock_TopologyProvider.go index d66c45e255..0646d73a71 100644 --- a/util/topo/mock_TopologyProvider.go +++ b/util/topo/mock_TopologyProvider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.1. DO NOT EDIT. +// Code generated by mockery v2.40.3. DO NOT EDIT. package topo @@ -17,7 +17,15 @@ type MockTopologyProvider struct { func (_m *MockTopologyProvider) GetAlertManager(ctx context.Context) (*AlertManagerInfo, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetAlertManager") + } + var r0 *AlertManagerInfo + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*AlertManagerInfo, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) *AlertManagerInfo); ok { r0 = rf(ctx) } else { @@ -26,7 +34,6 @@ func (_m *MockTopologyProvider) GetAlertManager(ctx context.Context) (*AlertMana } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -40,7 +47,15 @@ func (_m *MockTopologyProvider) GetAlertManager(ctx context.Context) (*AlertMana func (_m *MockTopologyProvider) GetGrafana(ctx context.Context) (*GrafanaInfo, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetGrafana") + } + var r0 *GrafanaInfo + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*GrafanaInfo, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) *GrafanaInfo); ok { r0 = rf(ctx) } else { @@ -49,7 +64,6 @@ func (_m *MockTopologyProvider) GetGrafana(ctx context.Context) (*GrafanaInfo, e } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -63,7 +77,15 @@ func (_m *MockTopologyProvider) GetGrafana(ctx context.Context) (*GrafanaInfo, e func (_m *MockTopologyProvider) GetPD(ctx context.Context) ([]PDInfo, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetPD") + } + var r0 []PDInfo + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) ([]PDInfo, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) []PDInfo); ok { r0 = rf(ctx) } else { @@ -72,7 +94,6 @@ func (_m *MockTopologyProvider) GetPD(ctx context.Context) ([]PDInfo, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -86,7 +107,15 @@ func (_m *MockTopologyProvider) GetPD(ctx context.Context) ([]PDInfo, error) { func (_m *MockTopologyProvider) GetPrometheus(ctx context.Context) (*PrometheusInfo, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetPrometheus") + } + var r0 *PrometheusInfo + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*PrometheusInfo, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) *PrometheusInfo); ok { r0 = rf(ctx) } else { @@ -95,7 +124,6 @@ func (_m *MockTopologyProvider) GetPrometheus(ctx context.Context) (*PrometheusI } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -109,7 +137,15 @@ func (_m *MockTopologyProvider) GetPrometheus(ctx context.Context) (*PrometheusI func (_m *MockTopologyProvider) GetTiDB(ctx context.Context) ([]TiDBInfo, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetTiDB") + } + var r0 []TiDBInfo + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) ([]TiDBInfo, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) []TiDBInfo); ok { r0 = rf(ctx) } else { @@ -118,7 +154,6 @@ func (_m *MockTopologyProvider) GetTiDB(ctx context.Context) ([]TiDBInfo, error) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -132,7 +167,15 @@ func (_m *MockTopologyProvider) GetTiDB(ctx context.Context) ([]TiDBInfo, error) func (_m *MockTopologyProvider) GetTiFlash(ctx context.Context) ([]TiFlashStoreInfo, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetTiFlash") + } + var r0 []TiFlashStoreInfo + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) ([]TiFlashStoreInfo, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) []TiFlashStoreInfo); ok { r0 = rf(ctx) } else { @@ -141,7 +184,6 @@ func (_m *MockTopologyProvider) GetTiFlash(ctx context.Context) ([]TiFlashStoreI } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -155,7 +197,15 @@ func (_m *MockTopologyProvider) GetTiFlash(ctx context.Context) ([]TiFlashStoreI func (_m *MockTopologyProvider) GetTiKV(ctx context.Context) ([]TiKVStoreInfo, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetTiKV") + } + var r0 []TiKVStoreInfo + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) ([]TiKVStoreInfo, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) []TiKVStoreInfo); ok { r0 = rf(ctx) } else { @@ -164,7 +214,6 @@ func (_m *MockTopologyProvider) GetTiKV(ctx context.Context) ([]TiKVStoreInfo, e } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -174,13 +223,12 @@ func (_m *MockTopologyProvider) GetTiKV(ctx context.Context) ([]TiKVStoreInfo, e return r0, r1 } -type mockConstructorTestingTNewMockTopologyProvider interface { +// NewMockTopologyProvider creates a new instance of MockTopologyProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockTopologyProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockTopologyProvider creates a new instance of MockTopologyProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockTopologyProvider(t mockConstructorTestingTNewMockTopologyProvider) *MockTopologyProvider { +}) *MockTopologyProvider { mock := &MockTopologyProvider{} mock.Mock.Test(t) diff --git a/util/topo/pdtopo/monitor.go b/util/topo/pdtopo/monitor.go index 2f0aa85ea6..38369bdbac 100644 --- a/util/topo/pdtopo/monitor.go +++ b/util/topo/pdtopo/monitor.go @@ -5,7 +5,7 @@ package pdtopo import ( "context" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "github.com/pingcap/tidb-dashboard/util/topo" ) diff --git a/util/topo/pdtopo/provider_pd.go b/util/topo/pdtopo/provider_pd.go index 13059b7049..63a1114774 100644 --- a/util/topo/pdtopo/provider_pd.go +++ b/util/topo/pdtopo/provider_pd.go @@ -5,7 +5,7 @@ package pdtopo import ( "context" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "github.com/pingcap/tidb-dashboard/util/client/pdclient" "github.com/pingcap/tidb-dashboard/util/topo" diff --git a/util/topo/pdtopo/std_comp.go b/util/topo/pdtopo/std_comp.go index e4bf2b811e..6fc6c76cc5 100644 --- a/util/topo/pdtopo/std_comp.go +++ b/util/topo/pdtopo/std_comp.go @@ -8,7 +8,7 @@ import ( "github.com/joomcode/errorx" "github.com/pingcap/log" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" "github.com/pingcap/tidb-dashboard/util/topo" diff --git a/util/topo/pdtopo/tidb.go b/util/topo/pdtopo/tidb.go index 219d231ff2..119b675ad1 100644 --- a/util/topo/pdtopo/tidb.go +++ b/util/topo/pdtopo/tidb.go @@ -11,7 +11,7 @@ import ( "time" "github.com/pingcap/log" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" "github.com/pingcap/tidb-dashboard/util/distro"