From 2e929746a297d146b88f85320c2f356ae26a0da2 Mon Sep 17 00:00:00 2001 From: "vitess-bot[bot]" <108069721+vitess-bot[bot]@users.noreply.github.com> Date: Fri, 21 Aug 2026 00:22:55 +0000 Subject: [PATCH 1/4] bump go version to go1.27.0 Signed-off-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> --- Makefile | 2 +- docker/bootstrap/CHANGELOG.md | 6 +++++- docker/bootstrap/Dockerfile.common | 2 +- docker/lite/Dockerfile | 2 +- docker/lite/Dockerfile.mysql80 | 2 +- docker/lite/Dockerfile.mysql84 | 2 +- docker/lite/Dockerfile.percona80 | 2 +- docker/lite/Dockerfile.percona84 | 2 +- docker/vttestserver/Dockerfile.mysql80 | 2 +- docker/vttestserver/Dockerfile.mysql84 | 2 +- go.mod | 2 +- test.go | 2 +- tools/addlicense/go.mod | 2 +- tools/gofumpt/go.mod | 2 +- tools/goimports/go.mod | 2 +- tools/golangci-lint/go.mod | 2 +- tools/gotestsum/go.mod | 2 +- tools/goyacc/go.mod | 2 +- 18 files changed, 22 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index cdac2141b22..d23f7d8a218 100644 --- a/Makefile +++ b/Makefile @@ -276,7 +276,7 @@ $(PROTO_GO_OUTS): minimaltools proto/*.proto # This rule builds the bootstrap images for all flavors. DOCKER_IMAGES_FOR_TEST = mysql80 mysql84 percona80 percona84 DOCKER_IMAGES = common $(DOCKER_IMAGES_FOR_TEST) -BOOTSTRAP_VERSION=59 +BOOTSTRAP_VERSION=60 ensure_bootstrap_version: find docker/ -type f -exec sed -i "s/^\(ARG bootstrap_version\)=.*/\1=${BOOTSTRAP_VERSION}/" {} \; sed -i 's/\(^.*flag.String(\"bootstrap-version\",\) *\"[^\"]\+\"/\1 \"${BOOTSTRAP_VERSION}\"/' test.go diff --git a/docker/bootstrap/CHANGELOG.md b/docker/bootstrap/CHANGELOG.md index edcbb0fb742..0576e1ff346 100644 --- a/docker/bootstrap/CHANGELOG.md +++ b/docker/bootstrap/CHANGELOG.md @@ -245,4 +245,8 @@ List of changes between bootstrap image versions. ## [59] - 2026-08-15 ### Changes -- Update build to golang 1.26.6 \ No newline at end of file +- Update build to golang 1.26.6 + +## [60] - 2026-08-21 +### Changes +- Update build to golang 1.27.0 \ No newline at end of file diff --git a/docker/bootstrap/Dockerfile.common b/docker/bootstrap/Dockerfile.common index abe47d590d0..90f8a2462ad 100644 --- a/docker/bootstrap/Dockerfile.common +++ b/docker/bootstrap/Dockerfile.common @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG image=golang:1.26.6-bookworm@sha256:433f9dc4f8ea3a1ce4e28f9f15d0f7c056b10475307f886d6f1ac1ccc4abd976 +ARG image=golang:1.27.0-bookworm@sha256:6033334f349f3912236ed6a06c5ed066605e58632dc415779b0d00a1568afa8d # Build the Vitess Go binaries FROM $image diff --git a/docker/lite/Dockerfile b/docker/lite/Dockerfile index 06d2b6b770c..8443b8867af 100644 --- a/docker/lite/Dockerfile +++ b/docker/lite/Dockerfile @@ -13,7 +13,7 @@ # limitations under the License. # Build the Vitess Go binaries -FROM golang:1.26.6-trixie@sha256:23fdfd3a6abc97c81e32a724cdd1cf541c06c416eb04d717815f4ed7c75623d0 AS go-builder +FROM golang:1.27.0-trixie@sha256:31df75a0f51705bb15c74cacaeadb6596ae270cea9ec05138928de7e2d1f65e8 AS go-builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER diff --git a/docker/lite/Dockerfile.mysql80 b/docker/lite/Dockerfile.mysql80 index 2ae63e53699..fae84afa3fe 100644 --- a/docker/lite/Dockerfile.mysql80 +++ b/docker/lite/Dockerfile.mysql80 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.26.6-bookworm@sha256:433f9dc4f8ea3a1ce4e28f9f15d0f7c056b10475307f886d6f1ac1ccc4abd976 AS go-builder +FROM golang:1.27.0-bookworm@sha256:6033334f349f3912236ed6a06c5ed066605e58632dc415779b0d00a1568afa8d AS go-builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER diff --git a/docker/lite/Dockerfile.mysql84 b/docker/lite/Dockerfile.mysql84 index 96940d13906..e06cbecede2 100644 --- a/docker/lite/Dockerfile.mysql84 +++ b/docker/lite/Dockerfile.mysql84 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.26.6-trixie@sha256:23fdfd3a6abc97c81e32a724cdd1cf541c06c416eb04d717815f4ed7c75623d0 AS go-builder +FROM golang:1.27.0-trixie@sha256:31df75a0f51705bb15c74cacaeadb6596ae270cea9ec05138928de7e2d1f65e8 AS go-builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER diff --git a/docker/lite/Dockerfile.percona80 b/docker/lite/Dockerfile.percona80 index 6fa4b683210..a9c9fd3a50e 100644 --- a/docker/lite/Dockerfile.percona80 +++ b/docker/lite/Dockerfile.percona80 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.26.6-bookworm@sha256:433f9dc4f8ea3a1ce4e28f9f15d0f7c056b10475307f886d6f1ac1ccc4abd976 AS go-builder +FROM golang:1.27.0-bookworm@sha256:6033334f349f3912236ed6a06c5ed066605e58632dc415779b0d00a1568afa8d AS go-builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER diff --git a/docker/lite/Dockerfile.percona84 b/docker/lite/Dockerfile.percona84 index 964016292f6..a78f3b7d899 100644 --- a/docker/lite/Dockerfile.percona84 +++ b/docker/lite/Dockerfile.percona84 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.26.6-trixie@sha256:23fdfd3a6abc97c81e32a724cdd1cf541c06c416eb04d717815f4ed7c75623d0 AS go-builder +FROM golang:1.27.0-trixie@sha256:31df75a0f51705bb15c74cacaeadb6596ae270cea9ec05138928de7e2d1f65e8 AS go-builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER diff --git a/docker/vttestserver/Dockerfile.mysql80 b/docker/vttestserver/Dockerfile.mysql80 index b249554979a..649bbc0d731 100644 --- a/docker/vttestserver/Dockerfile.mysql80 +++ b/docker/vttestserver/Dockerfile.mysql80 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.26.6-bookworm@sha256:433f9dc4f8ea3a1ce4e28f9f15d0f7c056b10475307f886d6f1ac1ccc4abd976 AS builder +FROM golang:1.27.0-bookworm@sha256:6033334f349f3912236ed6a06c5ed066605e58632dc415779b0d00a1568afa8d AS builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER diff --git a/docker/vttestserver/Dockerfile.mysql84 b/docker/vttestserver/Dockerfile.mysql84 index 56204a938f4..de7bc8bd636 100644 --- a/docker/vttestserver/Dockerfile.mysql84 +++ b/docker/vttestserver/Dockerfile.mysql84 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.26.6-bookworm@sha256:433f9dc4f8ea3a1ce4e28f9f15d0f7c056b10475307f886d6f1ac1ccc4abd976 AS builder +FROM golang:1.27.0-bookworm@sha256:6033334f349f3912236ed6a06c5ed066605e58632dc415779b0d00a1568afa8d AS builder # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER diff --git a/go.mod b/go.mod index 5521522cd2c..f4423aa623c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module vitess.io/vitess -go 1.26.6 +go 1.27.0 tool ( github.com/planetscale/vtprotobuf/cmd/protoc-gen-go-vtproto diff --git a/test.go b/test.go index eb35807d203..ae1376b3d96 100755 --- a/test.go +++ b/test.go @@ -79,7 +79,7 @@ For example: // Flags var ( flavor = flag.String("flavor", "mysql80", "comma-separated bootstrap flavor(s) to run against (when using Docker mode). Available flavors: all,"+flavors) - bootstrapVersion = flag.String("bootstrap-version", "59", "the version identifier to use for the docker images") + bootstrapVersion = flag.String("bootstrap-version", "60", "the version identifier to use for the docker images") runCount = flag.Int("runs", 1, "run each test this many times") logPass = flag.Bool("log-pass", false, "log test output even if it passes") timeout = flag.Duration("timeout", 30*time.Minute, "timeout for each test") diff --git a/tools/addlicense/go.mod b/tools/addlicense/go.mod index 22c5980531e..e58d52c0513 100644 --- a/tools/addlicense/go.mod +++ b/tools/addlicense/go.mod @@ -1,6 +1,6 @@ module vitess.io/vitess/tools/addlicense -go 1.26.6 +go 1.27.0 tool github.com/google/addlicense diff --git a/tools/gofumpt/go.mod b/tools/gofumpt/go.mod index b8f3570eb68..08b384901dc 100644 --- a/tools/gofumpt/go.mod +++ b/tools/gofumpt/go.mod @@ -1,6 +1,6 @@ module vitess.io/vitess/tools/gofumpt -go 1.26.6 +go 1.27.0 tool mvdan.cc/gofumpt diff --git a/tools/goimports/go.mod b/tools/goimports/go.mod index 7bedac10a1f..99379e5a53a 100644 --- a/tools/goimports/go.mod +++ b/tools/goimports/go.mod @@ -1,6 +1,6 @@ module vitess.io/vitess/tools/goimports -go 1.26.6 +go 1.27.0 tool golang.org/x/tools/cmd/goimports diff --git a/tools/golangci-lint/go.mod b/tools/golangci-lint/go.mod index 2b59cd41dae..08daa6cfa34 100644 --- a/tools/golangci-lint/go.mod +++ b/tools/golangci-lint/go.mod @@ -1,6 +1,6 @@ module vitess.io/vitess/tools/golangci-lint -go 1.26.6 +go 1.27.0 tool github.com/golangci/golangci-lint/v2/cmd/golangci-lint diff --git a/tools/gotestsum/go.mod b/tools/gotestsum/go.mod index 92689b04742..f4f145aa0e7 100644 --- a/tools/gotestsum/go.mod +++ b/tools/gotestsum/go.mod @@ -1,6 +1,6 @@ module vitess.io/vitess/tools/gotestsum -go 1.26.6 +go 1.27.0 tool gotest.tools/gotestsum diff --git a/tools/goyacc/go.mod b/tools/goyacc/go.mod index 1e2cae37a20..6e42d166bb5 100644 --- a/tools/goyacc/go.mod +++ b/tools/goyacc/go.mod @@ -1,6 +1,6 @@ module vitess.io/vitess/tools/goyacc -go 1.26.6 +go 1.27.0 tool github.com/vitessio/goyacc From 9ebb5b7de6ebd9735d4408d11ffd166e4749b566 Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Fri, 21 Aug 2026 04:31:38 +0000 Subject: [PATCH 2/4] Changes for go 1.27 Signed-off-by: Matt Lord --- .golangci.yml | 2 +- go.mod | 146 ++++++------ go/streamlog/streamlog_test.go | 12 +- .../vtgate/connectiondrain/main_test.go | 6 +- go/tools/asthelpergen/asthelpergen.go | 2 + go/tools/asthelpergen/equals_gen.go | 2 +- tools/goimports/go.mod | 10 +- tools/goimports/go.sum | 20 +- tools/golangci-lint/go.mod | 99 ++++---- tools/golangci-lint/go.sum | 216 +++++++++--------- tools/goyacc/go.mod | 6 +- tools/goyacc/go.sum | 12 +- 12 files changed, 266 insertions(+), 267 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index c9532207628..c34e1df83a9 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,6 @@ version: "2" run: - go: "1.26" + go: "1.27" linters: default: none enable: diff --git a/go.mod b/go.mod index f4423aa623c..40f73c2150a 100644 --- a/go.mod +++ b/go.mod @@ -13,132 +13,95 @@ require ( github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 github.com/Azure/azure-pipeline-go v0.2.3 github.com/Azure/azure-storage-blob-go v0.15.0 + github.com/DataDog/datadog-go/v5 v5.9.0 github.com/aquarapid/vaultlib v0.5.1 - github.com/armon/go-metrics v0.4.1 // indirect + github.com/aws/aws-sdk-go-v2 v1.43.6 + github.com/aws/aws-sdk-go-v2/config v1.32.37 + github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.3.13 + github.com/aws/aws-sdk-go-v2/service/s3 v1.107.2 + github.com/aws/smithy-go v1.27.8 + github.com/bndr/gotabulate v1.1.2 + github.com/brianvoe/gofakeit/v7 v7.15.0 github.com/buger/jsonparser v1.6.1 github.com/cespare/xxhash/v2 v2.3.0 + github.com/containerd/cgroups/v3 v3.1.3 github.com/dave/jennifer v1.7.1 + github.com/dustin/go-humanize v1.0.1 github.com/fsnotify/fsnotify v1.10.1 + github.com/gammazero/deque v1.2.1 github.com/go-sql-driver/mysql v1.10.0 github.com/go-viper/mapstructure/v2 v2.5.0 github.com/golang/glog v1.2.5 - github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v1.0.0 github.com/google/go-cmp v0.7.0 + github.com/google/go-containerregistry v0.21.9 + github.com/google/safehtml v0.1.0 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/google/uuid v1.6.0 github.com/gorilla/handlers v1.5.2 github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.3 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 + github.com/hanwen/go-fuse/v2 v2.11.0 github.com/hashicorp/consul/api/v2 v2.0.0 - github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/serf v0.10.4 // indirect + github.com/hashicorp/go-version v1.9.0 github.com/klauspost/compress v1.19.2 github.com/klauspost/pgzip v1.2.6 + github.com/kr/pretty v0.3.1 + github.com/kr/text v0.2.0 + github.com/lmittmann/tint v1.2.0 + github.com/mattn/go-isatty v0.0.24 github.com/minio/minio-go v6.0.14+incompatible + github.com/nsf/jsondiff v0.0.0-20210926074059-1e845ec5d249 github.com/olekukonko/tablewriter v1.1.4 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pierrec/lz4 v2.6.1+incompatible github.com/pires/go-proxyproto v0.15.0 - github.com/pkg/errors v0.9.1 // indirect github.com/planetscale/pargzip v0.0.0-20201116224723-90c7fc03ea8a github.com/planetscale/vtprotobuf v0.6.1-0.20250313105119-ba97887b0a25 github.com/prometheus/client_golang v1.24.1 github.com/prometheus/common v0.70.1 + github.com/shirou/gopsutil/v4 v4.26.7 github.com/sjmudd/stopwatch v0.1.1 github.com/soheilhy/cmux v0.1.5 + github.com/spf13/afero v1.15.0 github.com/spf13/cobra v1.10.2 + github.com/spf13/jwalterweatherman v1.1.0 github.com/spf13/pflag v1.0.10 github.com/spf13/viper v1.21.0 github.com/stretchr/testify v1.12.0 github.com/tchap/go-patricia v2.3.0+incompatible github.com/tidwall/gjson v1.19.0 + github.com/xlab/treeprint v1.2.0 github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 github.com/z-division/go-zookeeper v1.0.0 go.etcd.io/etcd/api/v3 v3.7.1 go.etcd.io/etcd/client/pkg/v3 v3.7.1 go.etcd.io/etcd/client/v3 v3.7.1 + go.opentelemetry.io/otel v1.45.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.45.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.45.0 + go.opentelemetry.io/otel/sdk v1.45.0 + go.opentelemetry.io/otel/trace v1.45.0 + go.opentelemetry.io/proto/otlp v1.11.0 + go.uber.org/goleak v1.3.0 go.uber.org/mock v0.6.0 - golang.org/x/crypto v0.55.0 // indirect - golang.org/x/mod v0.40.0 // indirect + golang.org/x/exp v0.0.0-20260813180055-c1d0aacb2297 golang.org/x/net v0.58.0 golang.org/x/oauth2 v0.36.0 + golang.org/x/sync v0.22.0 golang.org/x/sys v0.47.0 golang.org/x/term v0.45.0 - golang.org/x/text v0.41.0 // indirect golang.org/x/time v0.15.0 golang.org/x/tools v0.49.0 + gonum.org/v1/gonum v0.17.0 google.golang.org/api v0.293.0 - google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 // indirect google.golang.org/grpc v1.83.0 google.golang.org/grpc/examples v0.0.0-20250407062114-b368379ef8f6 google.golang.org/protobuf v1.36.12 - gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect gopkg.in/ldap.v2 v2.5.1 - sigs.k8s.io/yaml v1.6.0 -) - -require ( - github.com/DataDog/datadog-go/v5 v5.9.0 - github.com/aws/aws-sdk-go-v2 v1.43.6 - github.com/aws/aws-sdk-go-v2/config v1.32.37 - github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.3.13 - github.com/aws/aws-sdk-go-v2/service/s3 v1.107.2 - github.com/aws/smithy-go v1.27.8 - github.com/bndr/gotabulate v1.1.2 - github.com/brianvoe/gofakeit/v7 v7.15.0 - github.com/dustin/go-humanize v1.0.1 - github.com/gammazero/deque v1.2.1 - github.com/google/go-containerregistry v0.21.9 - github.com/google/safehtml v0.1.0 - github.com/hanwen/go-fuse/v2 v2.11.0 - github.com/hashicorp/go-version v1.9.0 - github.com/kr/pretty v0.3.1 - github.com/kr/text v0.2.0 - github.com/lmittmann/tint v1.2.0 - github.com/mattn/go-isatty v0.0.24 - github.com/nsf/jsondiff v0.0.0-20210926074059-1e845ec5d249 - github.com/shirou/gopsutil/v4 v4.26.7 - github.com/spf13/afero v1.15.0 - github.com/spf13/jwalterweatherman v1.1.0 - github.com/xlab/treeprint v1.2.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.45.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.45.0 - go.opentelemetry.io/proto/otlp v1.11.0 - go.uber.org/goleak v1.3.0 - golang.org/x/exp v0.0.0-20260813180055-c1d0aacb2297 - golang.org/x/sync v0.22.0 - gonum.org/v1/gonum v0.17.0 modernc.org/sqlite v1.56.0 -) - -require ( - filippo.io/edwards25519 v1.2.0 // indirect - github.com/aws/aws-sdk-go-v2/service/signin v1.5.6 // indirect - github.com/cenkalti/backoff/v5 v5.0.3 // indirect - github.com/cilium/ebpf v0.22.0 // indirect - github.com/clipperhouse/displaywidth v0.11.0 // indirect - github.com/clipperhouse/uax29/v2 v2.7.0 // indirect - github.com/containerd/log v0.1.0 // indirect - github.com/docker/cli v29.7.2+incompatible // indirect - github.com/docker/docker-credential-helpers v0.9.8 // indirect - github.com/go-ini/ini v1.67.0 // indirect - github.com/goccy/go-json v0.10.6 // indirect - github.com/godbus/dbus/v5 v5.2.2 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 // indirect - github.com/moby/sys/userns v0.2.0 // indirect - github.com/olekukonko/cat v0.0.0-20250911104152-50322a0618f6 // indirect - github.com/olekukonko/errors v1.3.0 // indirect - github.com/olekukonko/ll v0.1.8 // indirect - github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/opencontainers/runtime-spec v1.3.0 // indirect - github.com/sirupsen/logrus v1.10.0 // indirect - go.yaml.in/yaml/v2 v2.4.4 // indirect - go.yaml.in/yaml/v3 v3.0.5 // indirect - google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.2 // indirect - gotest.tools/v3 v3.5.2 // indirect + sigs.k8s.io/yaml v1.6.0 ) require ( @@ -149,10 +112,12 @@ require ( cloud.google.com/go/compute/metadata v0.9.0 // indirect cloud.google.com/go/iam v1.13.0 // indirect cloud.google.com/go/monitoring v1.30.0 // indirect + filippo.io/edwards25519 v1.2.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.35.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.59.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.59.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/armon/go-metrics v0.4.1 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.18 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.19.36 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.37 // indirect @@ -163,43 +128,65 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.30 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.37 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.38 // indirect + github.com/aws/aws-sdk-go-v2/service/signin v1.5.6 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.33.6 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.38.6 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.45.6 // indirect github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v5 v5.0.3 // indirect + github.com/cilium/ebpf v0.22.0 // indirect + github.com/clipperhouse/displaywidth v0.11.0 // indirect + github.com/clipperhouse/uax29/v2 v2.7.0 // indirect github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 // indirect - github.com/containerd/cgroups/v3 v3.1.3 + github.com/containerd/log v0.1.0 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.7.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect + github.com/docker/cli v29.7.2+incompatible // indirect + github.com/docker/docker-credential-helpers v0.9.8 // indirect github.com/ebitengine/purego v0.10.2 // indirect github.com/envoyproxy/go-control-plane/envoy v1.37.0 // indirect github.com/envoyproxy/protoc-gen-validate v1.3.3 // indirect github.com/fatih/color v1.19.0 // indirect github.com/felixge/httpsnoop v1.1.0 // indirect + github.com/go-ini/ini v1.67.0 // indirect github.com/go-jose/go-jose/v4 v4.1.4 // indirect github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect + github.com/goccy/go-json v0.10.6 // indirect + github.com/godbus/dbus/v5 v5.2.2 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/s2a-go v0.1.9 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.21 // indirect github.com/googleapis/gax-go/v2 v2.23.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.6.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/serf v0.10.4 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/lufia/plan9stats v0.0.0-20260802145828-341c2f0c90b5 // indirect github.com/mattn/go-colorable v0.1.15 // indirect github.com/mattn/go-ieproxy v0.0.12 // indirect github.com/mattn/go-runewidth v0.0.27 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/moby/sys/userns v0.2.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/ncruces/go-strftime v1.0.0 // indirect + github.com/olekukonko/cat v0.0.0-20250911104152-50322a0618f6 // indirect + github.com/olekukonko/errors v1.3.0 // indirect + github.com/olekukonko/ll v0.1.8 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/opencontainers/runtime-spec v1.3.0 // indirect github.com/pelletier/go-toml/v2 v2.4.3 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/power-devops/perfstat v0.0.0-20260805114148-88456608a4f6 // indirect github.com/prometheus/client_model v0.6.2 // indirect github.com/prometheus/procfs v0.21.1 // indirect @@ -207,6 +194,7 @@ require ( github.com/rogpeppe/go-internal v1.16.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.12.0 // indirect + github.com/sirupsen/logrus v1.10.0 // indirect github.com/spf13/cast v1.10.0 // indirect github.com/spiffe/go-spiffe/v2 v2.8.1 // indirect github.com/subosito/gotenv v1.6.0 // indirect @@ -219,16 +207,22 @@ require ( go.opentelemetry.io/contrib/detectors/gcp v1.45.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.70.0 // indirect - go.opentelemetry.io/otel v1.45.0 go.opentelemetry.io/otel/metric v1.45.0 // indirect - go.opentelemetry.io/otel/sdk v1.45.0 go.opentelemetry.io/otel/sdk/metric v1.45.0 // indirect - go.opentelemetry.io/otel/trace v1.45.0 go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.28.0 // indirect + go.yaml.in/yaml/v2 v2.4.4 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect + golang.org/x/crypto v0.55.0 // indirect + golang.org/x/mod v0.40.0 // indirect + golang.org/x/text v0.41.0 // indirect + google.golang.org/genproto v0.0.0-20260810153831-ec0a7760b754 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20260810153831-ec0a7760b754 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260810153831-ec0a7760b754 // indirect + google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.2 // indirect + gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + gotest.tools/v3 v3.5.2 // indirect modernc.org/libc v1.75.3 // indirect modernc.org/mathutil v1.7.1 // indirect modernc.org/memory v1.12.0 // indirect diff --git a/go/streamlog/streamlog_test.go b/go/streamlog/streamlog_test.go index a6f8dbe6555..ca03cabadf0 100644 --- a/go/streamlog/streamlog_test.go +++ b/go/streamlog/streamlog_test.go @@ -109,14 +109,12 @@ func TestHTTP(t *testing.T) { logger.mu.Lock() assert.Lenf(t, logger.subscribed, 1, "len(logger.subscribed) = %v, want %v", len(logger.subscribed), 1) logger.mu.Unlock() - for range 10 { + assert.Eventually(t, func() bool { logger.Send(&logMessage{"val3"}) - // Allow time for propagation (loopback interface - expected to be fast). - time.Sleep(1 * time.Millisecond) - } - logger.mu.Lock() - assert.Emptyf(t, logger.subscribed, "len(logger.subscribed) = %v, want %v", len(logger.subscribed), 0) - logger.mu.Unlock() + logger.mu.Lock() + defer logger.mu.Unlock() + return len(logger.subscribed) == 0 + }, 5*time.Second, 1*time.Millisecond, "expected the server handler to notice the closed client and unsubscribe") } func TestChannel(t *testing.T) { diff --git a/go/test/endtoend/vtgate/connectiondrain/main_test.go b/go/test/endtoend/vtgate/connectiondrain/main_test.go index c2254312603..0d893fe16f8 100644 --- a/go/test/endtoend/vtgate/connectiondrain/main_test.go +++ b/go/test/endtoend/vtgate/connectiondrain/main_test.go @@ -179,6 +179,8 @@ func TestConnectionDrainOnTermTimeout(t *testing.T) { _, err = vtConn2.ExecuteFetch("select id from t1", 1, false) require.Error(t, err) - // By now vtgate will be shutdown becaused it reached its onterm-timeout, despite idle connections still being opened - require.True(t, clusterInstance.VtgateProcess.IsShutdown()) + // By now vtgate will shut down because it reached its onterm-timeout, despite idle + // connections still being opened. There is a brief window between the connections + // being force-closed above and the process exiting, so allow for it. + require.Eventually(t, clusterInstance.VtgateProcess.IsShutdown, 10*time.Second, 100*time.Millisecond) } diff --git a/go/tools/asthelpergen/asthelpergen.go b/go/tools/asthelpergen/asthelpergen.go index 65e259123bf..bf334404092 100644 --- a/go/tools/asthelpergen/asthelpergen.go +++ b/go/tools/asthelpergen/asthelpergen.go @@ -429,6 +429,8 @@ var noQualifier = func(*types.Package) string { return "" } // printableTypeName returns a string that can be used as a valid golang identifier func printableTypeName(t types.Type) string { switch t := t.(type) { + case *types.Alias: + return printableTypeName(types.Unalias(t)) case *types.Pointer: return "RefOf" + printableTypeName(t.Elem()) case *types.Slice: diff --git a/go/tools/asthelpergen/equals_gen.go b/go/tools/asthelpergen/equals_gen.go index b1ee5189283..1316f92e6e2 100644 --- a/go/tools/asthelpergen/equals_gen.go +++ b/go/tools/asthelpergen/equals_gen.go @@ -169,7 +169,7 @@ func compareAllStructFields(strct *types.Struct, spi generatorSPI) jen.Code { var basicsPred []*jen.Statement var others []*jen.Statement for field := range strct.Fields() { - if field.Type().Underlying().String() == anyTypeName || strings.HasPrefix(field.Name(), "_") { + if types.TypeString(field.Type(), noQualifier) == anyTypeName || strings.HasPrefix(field.Name(), "_") { // we can safely ignore this, we do not want ast to contain `any` types. continue } diff --git a/tools/goimports/go.mod b/tools/goimports/go.mod index 99379e5a53a..28d5143a5ce 100644 --- a/tools/goimports/go.mod +++ b/tools/goimports/go.mod @@ -5,9 +5,9 @@ go 1.27.0 tool golang.org/x/tools/cmd/goimports require ( - golang.org/x/mod v0.30.0 // indirect - golang.org/x/sync v0.18.0 // indirect - golang.org/x/sys v0.38.0 // indirect - golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect - golang.org/x/tools v0.39.0 // indirect + golang.org/x/mod v0.39.0 // indirect + golang.org/x/sync v0.22.0 // indirect + golang.org/x/sys v0.47.0 // indirect + golang.org/x/telemetry v0.0.0-20260811182544-a038080d80e5 // indirect + golang.org/x/tools v0.49.0 // indirect ) diff --git a/tools/goimports/go.sum b/tools/goimports/go.sum index c8cf7927f27..e5531c9994d 100644 --- a/tools/goimports/go.sum +++ b/tools/goimports/go.sum @@ -1,12 +1,12 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk= -golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc= -golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= -golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= -golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= -golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 h1:E2/AqCUMZGgd73TQkxUMcMla25GB9i/5HOdLr+uH7Vo= -golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54/go.mod h1:hKdjCMrbv9skySur+Nek8Hd0uJ0GuxJIoIX2payrIdQ= -golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ= -golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ= +golang.org/x/mod v0.39.0 h1:UF5zwQdCRRUpHfyPwr7d4UrGiVeldIsogtzWVnczL74= +golang.org/x/mod v0.39.0/go.mod h1:bvIbwjQ0HUFFf5AKukeeYQG4ZBUG9yxQbR9aEweIwYY= +golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= +golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= +golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/telemetry v0.0.0-20260811182544-a038080d80e5 h1:ZUSxONxc981v7AW7QUg+I9WwZzSTTJ019ENBYr5pV/Q= +golang.org/x/telemetry v0.0.0-20260811182544-a038080d80e5/go.mod h1:LVehoXe41cL5SCVQilsV7Gg6BNG+Js6P9PhSbYTIUkQ= +golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= +golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= diff --git a/tools/golangci-lint/go.mod b/tools/golangci-lint/go.mod index 08daa6cfa34..a8bf7e4eddb 100644 --- a/tools/golangci-lint/go.mod +++ b/tools/golangci-lint/go.mod @@ -5,27 +5,28 @@ go 1.27.0 tool github.com/golangci/golangci-lint/v2/cmd/golangci-lint require ( - 4d63.com/gocheckcompilerdirectives v1.3.0 // indirect + 4d63.com/gocheckcompilerdirectives v1.4.0 // indirect 4d63.com/gochecknoglobals v0.2.2 // indirect - charm.land/lipgloss/v2 v2.0.3 // indirect + charm.land/lipgloss/v2 v2.0.6 // indirect codeberg.org/chavacava/garif v0.2.0 // indirect codeberg.org/polyfloyd/go-errorlint v1.9.0 // indirect dev.gaijin.team/go/exhaustruct/v4 v4.0.0 // indirect - dev.gaijin.team/go/golib v0.6.0 // indirect + dev.gaijin.team/go/exhaustruct/v5 v5.0.3 // indirect + dev.gaijin.team/go/golib v0.8.1 // indirect github.com/4meepo/tagalign v1.4.3 // indirect - github.com/Abirdcfly/dupword v0.1.7 // indirect + github.com/Abirdcfly/dupword v0.1.8 // indirect github.com/AdminBenni/iota-mixing v1.0.0 // indirect - github.com/AlwxSin/noinlineerr v1.0.5 // indirect - github.com/Antonboom/errname v1.1.1 // indirect - github.com/Antonboom/nilnil v1.1.1 // indirect + github.com/AlwxSin/noinlineerr v1.0.6 // indirect + github.com/Antonboom/errname v1.1.2 // indirect + github.com/Antonboom/nilnil v1.1.2 // indirect github.com/Antonboom/testifylint v1.6.4 // indirect github.com/BurntSushi/toml v1.6.0 // indirect - github.com/ClickHouse/clickhouse-go-linter v1.2.0 // indirect + github.com/ClickHouse/clickhouse-go-linter v1.2.1 // indirect github.com/Djarvur/go-err113 v0.1.1 // indirect github.com/Masterminds/semver/v3 v3.5.0 // indirect github.com/MirrexOne/unqueryvet v1.5.4 // indirect github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect - github.com/alecthomas/chroma/v2 v2.24.1 // indirect + github.com/alecthomas/chroma/v2 v2.27.0 // indirect github.com/alecthomas/go-check-sumtype v0.3.1 // indirect github.com/alexkohler/nakedret/v2 v2.0.6 // indirect github.com/alexkohler/prealloc v1.1.0 // indirect @@ -38,18 +39,18 @@ require ( github.com/bkielbasa/cyclop v1.2.3 // indirect github.com/blizzy78/varnamelen v0.8.0 // indirect github.com/bombsimon/wsl/v4 v4.7.0 // indirect - github.com/bombsimon/wsl/v5 v5.8.0 // indirect + github.com/bombsimon/wsl/v5 v5.9.0 // indirect github.com/breml/bidichk v0.3.3 // indirect github.com/breml/errchkjson v0.4.1 // indirect github.com/butuzov/ireturn v0.4.1 // indirect - github.com/butuzov/mirror v1.3.0 // indirect + github.com/butuzov/mirror v1.3.3 // indirect github.com/catenacyber/perfsprint v0.10.1 // indirect github.com/ccojocar/zxcvbn-go v1.0.4 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/charithe/durationcheck v0.0.11 // indirect github.com/charmbracelet/colorprofile v0.4.3 // indirect - github.com/charmbracelet/ultraviolet v0.0.0-20251205161215-1948445e3318 // indirect - github.com/charmbracelet/x/ansi v0.11.7 // indirect + github.com/charmbracelet/ultraviolet v0.0.0-20260811164956-006e29f97886 // indirect + github.com/charmbracelet/x/ansi v0.11.8 // indirect github.com/charmbracelet/x/term v0.2.2 // indirect github.com/charmbracelet/x/termios v0.1.1 // indirect github.com/charmbracelet/x/windows v0.2.2 // indirect @@ -59,17 +60,16 @@ require ( github.com/curioswitch/go-reassign v0.3.0 // indirect github.com/daixiang0/gci v0.13.7 // indirect github.com/dave/dst v0.27.3 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/denis-tingaikin/go-header v0.5.0 // indirect - github.com/dlclark/regexp2 v1.12.0 // indirect + github.com/dlclark/regexp2/v2 v2.2.1 // indirect github.com/ettle/strcase v0.2.0 // indirect github.com/fatih/color v1.19.0 // indirect github.com/fatih/structtag v1.2.0 // indirect - github.com/firefart/nonamedreturns v1.0.6 // indirect - github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/firefart/nonamedreturns v1.0.8 // indirect + github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect - github.com/ghostiam/protogetter v0.3.20 // indirect - github.com/go-critic/go-critic v0.14.3 // indirect + github.com/ghostiam/protogetter v0.3.21 // indirect + github.com/go-critic/go-critic v0.14.4 // indirect github.com/go-toolsmith/astcast v1.1.0 // indirect github.com/go-toolsmith/astcopy v1.1.0 // indirect github.com/go-toolsmith/astequal v1.2.0 // indirect @@ -86,8 +86,8 @@ require ( github.com/golangci/asciicheck v0.5.0 // indirect github.com/golangci/dupl v0.0.0-20260401084720-c99c5cf5c202 // indirect github.com/golangci/go-printf-func-name v0.1.1 // indirect - github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect - github.com/golangci/golangci-lint/v2 v2.12.2 // indirect + github.com/golangci/gofmt v0.0.0-20260820135601-e84e05053792 // indirect + github.com/golangci/golangci-lint/v2 v2.13.1 // indirect github.com/golangci/golines v0.15.0 // indirect github.com/golangci/misspell v0.8.0 // indirect github.com/golangci/plugin-module-register v0.1.2 // indirect @@ -107,23 +107,23 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jgautheron/goconst v1.10.0 // indirect + github.com/jgautheron/goconst v1.11.0 // indirect github.com/jjti/go-spancheck v0.6.5 // indirect github.com/julz/importas v0.2.0 // indirect github.com/karamaru-alpha/copyloopvar v1.2.2 // indirect - github.com/kisielk/errcheck v1.10.0 // indirect + github.com/kisielk/errcheck v1.20.0 // indirect github.com/kkHAIKE/contextcheck v1.1.6 // indirect github.com/kulti/thelper v0.7.1 // indirect github.com/kunwardeep/paralleltest v1.0.15 // indirect github.com/lasiar/canonicalheader v1.1.2 // indirect github.com/ldez/exptostd v0.4.5 // indirect - github.com/ldez/gomoddirectives v0.8.0 // indirect + github.com/ldez/gomoddirectives v0.9.0 // indirect github.com/ldez/grignotin v0.10.1 // indirect github.com/ldez/structtags v0.6.1 // indirect github.com/ldez/tagliatelle v0.7.2 // indirect github.com/ldez/usetesting v0.5.0 // indirect github.com/leonklingele/grouper v1.1.2 // indirect - github.com/lucasb-eyer/go-colorful v1.4.0 // indirect + github.com/lucasb-eyer/go-colorful v1.4.1 // indirect github.com/macabu/inamedparam v0.2.0 // indirect github.com/magiconair/properties v1.8.6 // indirect github.com/manuelarte/embeddedstructfieldcheck v0.4.0 // indirect @@ -131,9 +131,9 @@ require ( github.com/maratori/testableexamples v1.0.1 // indirect github.com/maratori/testpackage v1.1.2 // indirect github.com/matoous/godox v1.1.0 // indirect - github.com/mattn/go-colorable v0.1.14 // indirect + github.com/mattn/go-colorable v0.1.15 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.23 // indirect + github.com/mattn/go-runewidth v0.0.24 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/mgechev/revive v1.15.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -143,10 +143,9 @@ require ( github.com/nakabonne/nestif v0.3.1 // indirect github.com/nishanths/exhaustive v0.12.0 // indirect github.com/nishanths/predeclared v0.2.2 // indirect - github.com/nunnatsa/ginkgolinter v0.23.0 // indirect + github.com/nunnatsa/ginkgolinter v0.24.0 // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.3.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pelletier/go-toml/v2 v2.4.3 // indirect github.com/prometheus/client_golang v1.12.1 // indirect github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.32.1 // indirect @@ -156,18 +155,18 @@ require ( github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect - github.com/raeperd/recvcheck v0.2.0 // indirect + github.com/raeperd/recvcheck v0.3.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect - github.com/rogpeppe/go-internal v1.14.1 // indirect + github.com/rogpeppe/go-internal v1.16.0 // indirect github.com/ryancurrah/gomodguard v1.4.1 // indirect github.com/ryancurrah/gomodguard/v2 v2.1.3 // indirect github.com/ryanrolds/sqlclosecheck v0.6.0 // indirect github.com/sanposhiho/wastedassign/v2 v2.1.0 // indirect - github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect + github.com/santhosh-tekuri/jsonschema/v6 v6.0.3 // indirect github.com/sashamelentyev/interfacebloat v1.1.0 // indirect github.com/sashamelentyev/usestdlibvars v1.29.0 // indirect - github.com/securego/gosec/v2 v2.26.1 // indirect - github.com/sirupsen/logrus v1.9.4 // indirect + github.com/securego/gosec/v2 v2.28.0 // indirect + github.com/sirupsen/logrus v1.10.1 // indirect github.com/sivchari/containedctx v1.0.3 // indirect github.com/sonatard/noctx v0.5.1 // indirect github.com/sourcegraph/go-diff v0.8.0 // indirect @@ -179,8 +178,8 @@ require ( github.com/spf13/viper v1.12.0 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.3.1 // indirect - github.com/stretchr/objx v0.5.2 // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/stretchr/objx v0.5.3 // indirect + github.com/stretchr/testify v1.12.1 // indirect github.com/subosito/gotenv v1.4.1 // indirect github.com/tetafro/godot v1.5.6 // indirect github.com/timakin/bodyclose v0.0.0-20260129054331-73d1f95b84b4 // indirect @@ -190,7 +189,7 @@ require ( github.com/ultraware/funlen v0.2.0 // indirect github.com/ultraware/whitespace v0.2.0 // indirect github.com/uudashr/gocognit v1.2.1 // indirect - github.com/uudashr/iface v1.4.2 // indirect + github.com/uudashr/iface v1.5.0 // indirect github.com/xen0n/gosmopolitan v1.3.0 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect github.com/yagipy/maintidx v1.0.0 // indirect @@ -200,21 +199,21 @@ require ( go-simpler.org/musttag v0.14.0 // indirect go-simpler.org/sloglint v0.12.0 // indirect go.augendre.info/arangolint v0.4.0 // indirect - go.augendre.info/fatcontext v0.9.0 // indirect + go.augendre.info/fatcontext v0.10.0 // indirect go.uber.org/multierr v1.10.0 // indirect go.uber.org/zap v1.27.0 // indirect - go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358 // indirect - golang.org/x/mod v0.35.0 // indirect - golang.org/x/sync v0.20.0 // indirect - golang.org/x/sys v0.43.0 // indirect - golang.org/x/text v0.36.0 // indirect - golang.org/x/tools v0.44.0 // indirect - google.golang.org/protobuf v1.36.10 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect + golang.org/x/exp/typeparams v0.0.0-20260811152304-ee035b5b010f // indirect + golang.org/x/mod v0.40.0 // indirect + golang.org/x/sync v0.22.0 // indirect + golang.org/x/sys v0.47.0 // indirect + golang.org/x/text v0.40.0 // indirect + golang.org/x/tools v0.49.0 // indirect + google.golang.org/protobuf v1.36.11 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - honnef.co/go/tools v0.7.0 // indirect - mvdan.cc/gofumpt v0.9.2 // indirect - mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15 // indirect + honnef.co/go/tools v0.8.0 // indirect + mvdan.cc/gofumpt v0.11.0 // indirect + mvdan.cc/unparam v0.0.0-20260818115549-3f964bcb5673 // indirect ) diff --git a/tools/golangci-lint/go.sum b/tools/golangci-lint/go.sum index 778bb5379bd..826a362da3b 100644 --- a/tools/golangci-lint/go.sum +++ b/tools/golangci-lint/go.sum @@ -1,9 +1,9 @@ -4d63.com/gocheckcompilerdirectives v1.3.0 h1:Ew5y5CtcAAQeTVKUVFrE7EwHMrTO6BggtEj8BZSjZ3A= -4d63.com/gocheckcompilerdirectives v1.3.0/go.mod h1:ofsJ4zx2QAuIP/NO/NAh1ig6R1Fb18/GI7RVMwz7kAY= +4d63.com/gocheckcompilerdirectives v1.4.0 h1:ZLq62rbGWVmQhiZ8kuNVIT/M09xCSTdJz9K3xOdT/CY= +4d63.com/gocheckcompilerdirectives v1.4.0/go.mod h1:9ZOAiMOjqC/nRwci2fcUXVHUNLG/cH6r6rhUh+jTFtQ= 4d63.com/gochecknoglobals v0.2.2 h1:H1vdnwnMaZdQW/N+NrkT1SZMTBmcwHe9Vq8lJcYYTtU= 4d63.com/gochecknoglobals v0.2.2/go.mod h1:lLxwTQjL5eIesRbvnzIP3jZtG140FnTdz+AlMa+ogt0= -charm.land/lipgloss/v2 v2.0.3 h1:yM2zJ4Cf5Y51b7RHIwioil4ApI/aypFXXVHSwlM6RzU= -charm.land/lipgloss/v2 v2.0.3/go.mod h1:7myLU9iG/3xluAWzpY/fSxYYHCgoKTie7laxk6ATwXA= +charm.land/lipgloss/v2 v2.0.6 h1:EaGKeuA8FvF+v2BT5VmZd2LoYLaMZJXA5n34th8nCIQ= +charm.land/lipgloss/v2 v2.0.6/go.mod h1:ipDDJNSGa1hlwDtSfW1s2/xR8Vdhbut4PXh2zEKZd0Q= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -42,29 +42,31 @@ codeberg.org/polyfloyd/go-errorlint v1.9.0 h1:VkdEEmA1VBpH6ecQoMR4LdphVI3fA4RrCh codeberg.org/polyfloyd/go-errorlint v1.9.0/go.mod h1:GPRRu2LzVijNn4YkrZYJfatQIdS+TrcK8rL5Xs24qw8= dev.gaijin.team/go/exhaustruct/v4 v4.0.0 h1:873r7aNneqoBB3IaFIzhvt2RFYTuHgmMjoKfwODoI1Y= dev.gaijin.team/go/exhaustruct/v4 v4.0.0/go.mod h1:aZ/k2o4Y05aMJtiux15x8iXaumE88YdiB0Ai4fXOzPI= -dev.gaijin.team/go/golib v0.6.0 h1:v6nnznFTs4bppib/NyU1PQxobwDHwCXXl15P7DV5Zgo= -dev.gaijin.team/go/golib v0.6.0/go.mod h1:uY1mShx8Z/aNHWDyAkZTkX+uCi5PdX7KsG1eDQa2AVE= +dev.gaijin.team/go/exhaustruct/v5 v5.0.3 h1:yOeA7DNjlT8y4yfmN6nWWYYggA13N523YAj9/TXbuTM= +dev.gaijin.team/go/exhaustruct/v5 v5.0.3/go.mod h1:KwtBsX8nHHH1YxhxkpiBq6bfsmw5WnazWpNvJPHgY9Y= +dev.gaijin.team/go/golib v0.8.1 h1:JYju4x9BSo+QD/AYeHULVDcvEhiFg8wOi6pT0IaZF5E= +dev.gaijin.team/go/golib v0.8.1/go.mod h1:c5fu7t1RSGMxSQgcUYO1sODbzsYnOCXJLmHeNG1Eb+0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/4meepo/tagalign v1.4.3 h1:Bnu7jGWwbfpAie2vyl63Zup5KuRv21olsPIha53BJr8= github.com/4meepo/tagalign v1.4.3/go.mod h1:00WwRjiuSbrRJnSVeGWPLp2epS5Q/l4UEy0apLLS37c= -github.com/Abirdcfly/dupword v0.1.7 h1:2j8sInznrje4I0CMisSL6ipEBkeJUJAmK1/lfoNGWrQ= -github.com/Abirdcfly/dupword v0.1.7/go.mod h1:K0DkBeOebJ4VyOICFdppB23Q0YMOgVafM0zYW0n9lF4= +github.com/Abirdcfly/dupword v0.1.8 h1:SrhcUuGsROBuChFxHALRYzyyPODWn9zwghmzPvD9Cd8= +github.com/Abirdcfly/dupword v0.1.8/go.mod h1:XZrhVnI7YGpsTiWZANSQaBJ4QpL/Tq5vIEdKJJAs9WI= github.com/AdminBenni/iota-mixing v1.0.0 h1:Os6lpjG2dp/AE5fYBPAA1zfa2qMdCAWwPMCgpwKq7wo= github.com/AdminBenni/iota-mixing v1.0.0/go.mod h1:i4+tpAaB+qMVIV9OK3m4/DAynOd5bQFaOu+2AhtBCNY= -github.com/AlwxSin/noinlineerr v1.0.5 h1:RUjt63wk1AYWTXtVXbSqemlbVTb23JOSRiNsshj7TbY= -github.com/AlwxSin/noinlineerr v1.0.5/go.mod h1:+QgkkoYrMH7RHvcdxdlI7vYYEdgeoFOVjU9sUhw/rQc= -github.com/Antonboom/errname v1.1.1 h1:bllB7mlIbTVzO9jmSWVWLjxTEbGBVQ1Ff/ClQgtPw9Q= -github.com/Antonboom/errname v1.1.1/go.mod h1:gjhe24xoxXp0ScLtHzjiXp0Exi1RFLKJb0bVBtWKCWQ= -github.com/Antonboom/nilnil v1.1.1 h1:9Mdr6BYd8WHCDngQnNVV0b554xyisFioEKi30sksufQ= -github.com/Antonboom/nilnil v1.1.1/go.mod h1:yCyAmSw3doopbOWhJlVci+HuyNRuHJKIv6V2oYQa8II= +github.com/AlwxSin/noinlineerr v1.0.6 h1:KAvuxunTe9QxvqrFB7nZTdb/7Wzas4AvifslTnG0Ld8= +github.com/AlwxSin/noinlineerr v1.0.6/go.mod h1:+QgkkoYrMH7RHvcdxdlI7vYYEdgeoFOVjU9sUhw/rQc= +github.com/Antonboom/errname v1.1.2 h1:dxwONZJua3VB8Xh/VaCjqAcqF645sWWv7xj26zy7tdQ= +github.com/Antonboom/errname v1.1.2/go.mod h1:YeZIpgLMxT+SNkruGgYkLhzq/9vs3fsolTZegKaKDZI= +github.com/Antonboom/nilnil v1.1.2 h1:aNlFuJhaEseXe4fHO3xbjXlSeEiQVYa2lEkWD2s2hAY= +github.com/Antonboom/nilnil v1.1.2/go.mod h1:0ynwvphOLmAuMwTNDyBnDZmSwZoDpcFXmUHmzoHH2WA= github.com/Antonboom/testifylint v1.6.4 h1:gs9fUEy+egzxkEbq9P4cpcMB6/G0DYdMeiFS87UiqmQ= github.com/Antonboom/testifylint v1.6.4/go.mod h1:YO33FROXX2OoUfwjz8g+gUxQXio5i9qpVy7nXGbxDD4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ClickHouse/clickhouse-go-linter v1.2.0 h1:zbm174up3hTKjp0wKZVnTzRiG7tSF5XZF0FJG/MuCBI= -github.com/ClickHouse/clickhouse-go-linter v1.2.0/go.mod h1:pLorS7ffPTfuUV9M0SJgfHA/h/WQPQUk2FWG9x74cQ4= +github.com/ClickHouse/clickhouse-go-linter v1.2.1 h1:zGEKIyd5YL08ieWG/LOUmlau2DxbxPVOfAeo+4Jz3ck= +github.com/ClickHouse/clickhouse-go-linter v1.2.1/go.mod h1:pLorS7ffPTfuUV9M0SJgfHA/h/WQPQUk2FWG9x74cQ4= github.com/Djarvur/go-err113 v0.1.1 h1:eHfopDqXRwAi+YmCUas75ZE0+hoBHJ2GQNLYRSxao4g= github.com/Djarvur/go-err113 v0.1.1/go.mod h1:IaWJdYFLg76t2ihfflPZnM1LIQszWOsFDh2hhhAVF6k= github.com/Masterminds/semver/v3 v3.5.0 h1:kQceYJfbupGfZOKZQg0kou0DgAKhzDg2NZPAwZ/2OOE= @@ -75,8 +77,8 @@ github.com/OpenPeeDeeP/depguard/v2 v2.2.1 h1:vckeWVESWp6Qog7UZSARNqfu/cZqvki8zsu github.com/OpenPeeDeeP/depguard/v2 v2.2.1/go.mod h1:q4DKzC4UcVaAvcfd41CZh0PWpGgzrVxUYBlgKNGquUo= github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= -github.com/alecthomas/chroma/v2 v2.24.1 h1:m5ffpfZbIb++k8AqFEKy9uVgY12xIQtBsQlc6DfZJQM= -github.com/alecthomas/chroma/v2 v2.24.1/go.mod h1:l+ohZ9xRXIbGe7cIW+YZgOGbvuVLjMps/FYN/CwuabI= +github.com/alecthomas/chroma/v2 v2.27.0 h1:FodwmyOBgJULFYmDqibcp9pvfDLWdtPRh9v/r5BXYZs= +github.com/alecthomas/chroma/v2 v2.27.0/go.mod h1:NjJ3ciIgrqBNeIkWZ4e46nseoLDslxU1LmfCoL+wcY8= github.com/alecthomas/go-check-sumtype v0.3.1 h1:u9aUvbGINJxLVXiFvHUlPEaD7VDULsrxJb4Aq31NLkU= github.com/alecthomas/go-check-sumtype v0.3.1/go.mod h1:A8TSiN3UPRw3laIgWEUOHHLPa6/r9MtoigdlP5h3K/E= github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs= @@ -110,16 +112,16 @@ github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= github.com/bombsimon/wsl/v4 v4.7.0 h1:1Ilm9JBPRczjyUs6hvOPKvd7VL1Q++PL8M0SXBDf+jQ= github.com/bombsimon/wsl/v4 v4.7.0/go.mod h1:uV/+6BkffuzSAVYD+yGyld1AChO7/EuLrCF/8xTiapg= -github.com/bombsimon/wsl/v5 v5.8.0 h1:JTkyfs4yl8SPejrCF2GdABXE+mO1WvM7iUYzRWlsxDs= -github.com/bombsimon/wsl/v5 v5.8.0/go.mod h1:AbOLsulgkqP4ZnitHf9gwPtCOGlrzkk0jb0uNxRSY0o= +github.com/bombsimon/wsl/v5 v5.9.0 h1:WCrgZ7RQnZO5oEwbVTlYgBdU3wL294kR1BSWV8vTfsU= +github.com/bombsimon/wsl/v5 v5.9.0/go.mod h1:kjo4HiAV5FDkHC8/uzJq9mBffEEd6WT/nvN7DoMovDM= github.com/breml/bidichk v0.3.3 h1:WSM67ztRusf1sMoqH6/c4OBCUlRVTKq+CbSeo0R17sE= github.com/breml/bidichk v0.3.3/go.mod h1:ISbsut8OnjB367j5NseXEGGgO/th206dVa427kR8YTE= github.com/breml/errchkjson v0.4.1 h1:keFSS8D7A2T0haP9kzZTi7o26r7kE3vymjZNeNDRDwg= github.com/breml/errchkjson v0.4.1/go.mod h1:a23OvR6Qvcl7DG/Z4o0el6BRAjKnaReoPQFciAl9U3s= github.com/butuzov/ireturn v0.4.1 h1:vWb3NO4t77iku/sjCQ/2pHTQeOmxEhjIriJqRLg1Y+I= github.com/butuzov/ireturn v0.4.1/go.mod h1:q+DXKzTDV5guNuXLnIab9fKXizTn2miZHLhxH7V/GB4= -github.com/butuzov/mirror v1.3.0 h1:HdWCXzmwlQHdVhwvsfBb2Au0r3HyINry3bDWLYXiKoc= -github.com/butuzov/mirror v1.3.0/go.mod h1:AEij0Z8YMALaq4yQj9CPPVYOyJQyiexpQEQgihajRfI= +github.com/butuzov/mirror v1.3.3 h1:v0RsWBhfFc1RQqE/f3sHpSttKDtodFn0gFmtYyD4/hA= +github.com/butuzov/mirror v1.3.3/go.mod h1:h9BzzwYnTiHO0GzgvaTqIg7VSsOUhdIv51cHFFBmX1w= github.com/catenacyber/perfsprint v0.10.1 h1:u7Riei30bk46XsG8nknMhKLXG9BcXz3+3tl/WpKm0PQ= github.com/catenacyber/perfsprint v0.10.1/go.mod h1:DJTGsi/Zufpuus6XPGJyKOTMELe347o6akPvWG9Zcsc= github.com/ccojocar/zxcvbn-go v1.0.4 h1:FWnCIRMXPj43ukfX000kvBZvV6raSxakYr1nzyNrUcc= @@ -133,10 +135,10 @@ github.com/charithe/durationcheck v0.0.11 h1:g1/EX1eIiKS57NTWsYtHDZ/APfeXKhye1Di github.com/charithe/durationcheck v0.0.11/go.mod h1:x5iZaixRNl8ctbM+3B2RrPG5t856TxRyVQEnbIEM2X4= github.com/charmbracelet/colorprofile v0.4.3 h1:QPa1IWkYI+AOB+fE+mg/5/4HRMZcaXex9t5KX76i20Q= github.com/charmbracelet/colorprofile v0.4.3/go.mod h1:/zT4BhpD5aGFpqQQqw7a+VtHCzu+zrQtt1zhMt9mR4Q= -github.com/charmbracelet/ultraviolet v0.0.0-20251205161215-1948445e3318 h1:OqDqxQZliC7C8adA7KjelW3OjtAxREfeHkNcd66wpeI= -github.com/charmbracelet/ultraviolet v0.0.0-20251205161215-1948445e3318/go.mod h1:Y6kE2GzHfkyQQVCSL9r2hwokSrIlHGzZG+71+wDYSZI= -github.com/charmbracelet/x/ansi v0.11.7 h1:kzv1kJvjg2S3r9KHo8hDdHFQLEqn4RBCb39dAYC84jI= -github.com/charmbracelet/x/ansi v0.11.7/go.mod h1:9qGpnAVYz+8ACONkZBUWPtL7lulP9No6p1epAihUZwQ= +github.com/charmbracelet/ultraviolet v0.0.0-20260811164956-006e29f97886 h1:rdnVWKgJpTVXKuKuJyxDJ+NFJdUaUqGvyGy61OcvlbA= +github.com/charmbracelet/ultraviolet v0.0.0-20260811164956-006e29f97886/go.mod h1:nAw0d9PhFp1qdzi2xhQU5YOu5sVpDIHWlaW2Uz/bCro= +github.com/charmbracelet/x/ansi v0.11.8 h1:JMFwp0CgDC2+jcOB162HH5k7I3FVbgFSMMYg7dSPBQQ= +github.com/charmbracelet/x/ansi v0.11.8/go.mod h1:ZNN+3mXny/516oTQPLMPIBeSINvNJJQ8uQXDgbeJxY0= github.com/charmbracelet/x/term v0.2.2 h1:xVRT/S2ZcKdhhOuSP4t5cLi5o+JxklsoEObBSgfgZRk= github.com/charmbracelet/x/term v0.2.2/go.mod h1:kF8CY5RddLWrsgVwpw4kAa6TESp6EB5y3uxGLeCqzAI= github.com/charmbracelet/x/termios v0.1.1 h1:o3Q2bT8eqzGnGPOYheoYS8eEleT5ZVNYNy8JawjaNZY= @@ -164,12 +166,15 @@ github.com/dave/dst v0.27.3/go.mod h1:jHh6EOibnHgcUW3WjKHisiooEkYwqpHLBSX1iOBhEy github.com/dave/jennifer v1.7.1 h1:B4jJJDHelWcDhlRQxWeo0Npa/pYKBLrirAQoTN45txo= github.com/dave/jennifer v1.7.1/go.mod h1:nXbxhEmQfOZhWml3D1cDK5M1FLnMSozpbFN/m3RmGZc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8= github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= github.com/dlclark/regexp2 v1.12.0 h1:0j4c5qQmnC6XOWNjP3PIXURXN2gWx76rd3KvgdPkCz8= github.com/dlclark/regexp2 v1.12.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/dlclark/regexp2/v2 v2.2.1 h1:mf4KkFUj0gJuarK8P+LgiS+Lit7m9N1yAwEfPbee7R0= +github.com/dlclark/regexp2/v2 v2.2.1/go.mod h1:avUrQvPaLz2DrFNHJF0taWAFFX2C1GMSSoeiqFjcBmU= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -180,18 +185,18 @@ github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w= github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE= 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/firefart/nonamedreturns v1.0.6 h1:vmiBcKV/3EqKY3ZiPxCINmpS431OcE1S47AQUwhrg8E= -github.com/firefart/nonamedreturns v1.0.6/go.mod h1:R8NisJnSIpvPWheCq0mNRXJok6D8h7fagJTF8EMEwCo= +github.com/firefart/nonamedreturns v1.0.8 h1:iB32Dl17zJl1zlVEj/WlUWgx0HiRyQ85OUw1WHa4/II= +github.com/firefart/nonamedreturns v1.0.8/go.mod h1:vxFNvm5AfP/8rgAKFzYmnqx0yp1HjrYsErZ9pHPTznA= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= -github.com/ghostiam/protogetter v0.3.20 h1:oW7OPFit2FxZOpmMRPP9FffU4uUpfeE/rEdE1f+MzD0= -github.com/ghostiam/protogetter v0.3.20/go.mod h1:FjIu5Yfs6FT391m+Fjp3fbAYJ6rkL/J6ySpZBfnODuI= -github.com/go-critic/go-critic v0.14.3 h1:5R1qH2iFeo4I/RJU8vTezdqs08Egi4u5p6vOESA0pog= -github.com/go-critic/go-critic v0.14.3/go.mod h1:xwntfW6SYAd7h1OqDzmN6hBX/JxsEKl5up/Y2bsxgVQ= +github.com/ghostiam/protogetter v0.3.21 h1:EeWTGvL/Eyosp653hiWb6Byx4b69iJC4/E+za7vQHoI= +github.com/ghostiam/protogetter v0.3.21/go.mod h1:iAKSpyoHwYzay+OpjoWgwzRtPFthEfuUvmlomTThck0= +github.com/go-critic/go-critic v0.14.4 h1:dSX4C3pWSeuMVxvQh6yG8U0ReSf3YOmKi4nwX5q7n/8= +github.com/go-critic/go-critic v0.14.4/go.mod h1:xwntfW6SYAd7h1OqDzmN6hBX/JxsEKl5up/Y2bsxgVQ= 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= @@ -203,8 +208,8 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= -github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= +github.com/go-quicktest/qt v1.102.0 h1:HSQxCeh5YZH3EL3W39ixjtyaEhcWSXQHtHnMBzSs474= +github.com/go-quicktest/qt v1.102.0/go.mod h1:p4lGIVX+8Wa6ZPNDvqcxq36XpUDLh42FLetFU7odllI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= @@ -273,10 +278,10 @@ github.com/golangci/dupl v0.0.0-20260401084720-c99c5cf5c202 h1:CbTB8KpqnViI6lIXx github.com/golangci/dupl v0.0.0-20260401084720-c99c5cf5c202/go.mod h1:NUw9Zr2Sy7+HxzdjIULge71wI6yEg1lWQr7Evcu8K0E= github.com/golangci/go-printf-func-name v0.1.1 h1:hIYTFJqAGp1iwoIfsNTpoq1xZAarogrvjO9AfiW3B4U= github.com/golangci/go-printf-func-name v0.1.1/go.mod h1:Es64MpWEZbh0UBtTAICOZiB+miW53w/K9Or/4QogJss= -github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d h1:viFft9sS/dxoYY0aiOTsLKO2aZQAPT4nlQCsimGcSGE= -github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d/go.mod h1:ivJ9QDg0XucIkmwhzCDsqcnxxlDStoTl89jDMIoNxKY= -github.com/golangci/golangci-lint/v2 v2.12.2 h1:7+d1uY0bq1MU2UV3R5pW5Q7QWdcoq4naMRXM+gsJKrs= -github.com/golangci/golangci-lint/v2 v2.12.2/go.mod h1:opqHHuIcTG2R+4akzWMd4o1BnD9/1LcjICWOujr91U8= +github.com/golangci/gofmt v0.0.0-20260820135601-e84e05053792 h1:WL8YKrt3UbOBqSRU7GpP5BTtQTMWtVtj+mfPijgZeIg= +github.com/golangci/gofmt v0.0.0-20260820135601-e84e05053792/go.mod h1:te5hX0dW4C5r6YbXs+6ysNr8Q5UTmdIqGbb+mlFiYmA= +github.com/golangci/golangci-lint/v2 v2.13.1 h1:RuM4OcluM4xFQcGuRE6R7jA33pqxK/W1EsBxpugdZjg= +github.com/golangci/golangci-lint/v2 v2.13.1/go.mod h1:HwX7mDzqHbcSxlhrTygjX1GJbAfQ3sJAqOx41qQlhDE= github.com/golangci/golines v0.15.0 h1:Qnph25g8Y1c5fdo1X7GaRDGgnMHgnxh4Gk4VfPTtRx0= github.com/golangci/golines v0.15.0/go.mod h1:AZjXd23tbHMpowhtnGlj9KCNsysj72aeZVVHnVcZx10= github.com/golangci/misspell v0.8.0 h1:qvxQhiE2/5z+BVRo1kwYA8yGz+lOlu5Jfvtx2b04Jbg= @@ -316,8 +321,8 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 h1:z2ogiKUYzX5Is6zr/vP9vJGqPwcdqsWjOt+V8J7+bTc= -github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI= +github.com/google/pprof v0.0.0-20260709232956-b9395ee17fa0 h1:du0WGc8xSKq/++e0cglxhS/mXVqsR7+c7jLEi5Vqduw= +github.com/google/pprof v0.0.0-20260709232956-b9395ee17fa0/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= @@ -353,8 +358,8 @@ github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSo github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jgautheron/goconst v1.10.0 h1:Ptt+OoE4NaEWKhLrWrrN3IpZdGLiqaf7WLnEX/iv4Jw= -github.com/jgautheron/goconst v1.10.0/go.mod h1:0p+wv1lFOiUr0IlNNT1nrm6+8DB8u2sU6KHGzFRXHDc= +github.com/jgautheron/goconst v1.11.0 h1:KgN90z5qXt5f0Uzf3cWXev3hfMMFUyNeKdpkSBRvLDk= +github.com/jgautheron/goconst v1.11.0/go.mod h1:0p+wv1lFOiUr0IlNNT1nrm6+8DB8u2sU6KHGzFRXHDc= github.com/jjti/go-spancheck v0.6.5 h1:lmi7pKxa37oKYIMScialXUK6hP3iY5F1gu+mLBPgYB8= github.com/jjti/go-spancheck v0.6.5/go.mod h1:aEogkeatBrbYsyW6y5TgDfihCulDYciL1B7rG2vSsrU= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= @@ -370,8 +375,8 @@ github.com/julz/importas v0.2.0 h1:y+MJN/UdL63QbFJHws9BVC5RpA2iq0kpjrFajTGivjQ= github.com/julz/importas v0.2.0/go.mod h1:pThlt589EnCYtMnmhmRYY/qn9lCf/frPOK+WMx3xiJY= github.com/karamaru-alpha/copyloopvar v1.2.2 h1:yfNQvP9YaGQR7VaWLYcfZUlRP2eo2vhExWKxD/fP6q0= github.com/karamaru-alpha/copyloopvar v1.2.2/go.mod h1:oY4rGZqZ879JkJMtX3RRkcXRkmUvH0x35ykgaKgsgJY= -github.com/kisielk/errcheck v1.10.0 h1:Lvs/YAHP24YKg08LA8oDw2z9fJVme090RAXd90S+rrw= -github.com/kisielk/errcheck v1.10.0/go.mod h1:kQxWMMVZgIkDq7U8xtG/n2juOjbLgZtedi0D+/VL/i8= +github.com/kisielk/errcheck v1.20.0 h1:9rwHBNKzd4wkDWcROy3DvFGNqEPlkxBg305rvk7HabI= +github.com/kisielk/errcheck v1.20.0/go.mod h1:O+f80MKNwX8Oor2jwgpeQ9An7uJm+hRSgT+h22knRJU= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkHAIKE/contextcheck v1.1.6 h1:7HIyRcnyzxL9Lz06NGhiKvenXq7Zw6Q0UQu/ttjfJCE= github.com/kkHAIKE/contextcheck v1.1.6/go.mod h1:3dDbMRNBFaq8HFXWC1JyvDSPm43CmE6IuHam8Wr0rkg= @@ -393,8 +398,8 @@ github.com/lasiar/canonicalheader v1.1.2 h1:vZ5uqwvDbyJCnMhmFYimgMZnJMjwljN5VGY0 github.com/lasiar/canonicalheader v1.1.2/go.mod h1:qJCeLFS0G/QlLQ506T+Fk/fWMa2VmBUiEI2cuMK4djI= github.com/ldez/exptostd v0.4.5 h1:kv2ZGUVI6VwRfp/+bcQ6Nbx0ghFWcGIKInkG/oFn1aQ= github.com/ldez/exptostd v0.4.5/go.mod h1:QRjHRMXJrCTIm9WxVNH6VW7oN7KrGSht69bIRwvdFsM= -github.com/ldez/gomoddirectives v0.8.0 h1:JqIuTtgvFC2RdH1s357vrE23WJF2cpDCPFgA/TWDGpk= -github.com/ldez/gomoddirectives v0.8.0/go.mod h1:jutzamvZR4XYJLr0d5Honycp4Gy6GEg2mS9+2YX3F1Q= +github.com/ldez/gomoddirectives v0.9.0 h1:2YV/EX7nVlWL4jySusYTzBKHuE3D2fgcRsQuMa3yIoo= +github.com/ldez/gomoddirectives v0.9.0/go.mod h1:DdZzfm9MdXCjn2/UGYXCFfo+tzrp2Ib4iD2Q0kIJkwE= github.com/ldez/grignotin v0.10.1 h1:keYi9rYsgbvqAZGI1liek5c+jv9UUjbvdj3Tbn5fn4o= github.com/ldez/grignotin v0.10.1/go.mod h1:UlDbXFCARrXbWGNGP3S5vsysNXAPhnSuBufpTEbwOas= github.com/ldez/structtags v0.6.1 h1:bUooFLbXx41tW8SvkfwfFkkjPYvFFs59AAMgVg6DUBk= @@ -405,8 +410,8 @@ github.com/ldez/usetesting v0.5.0 h1:3/QtzZObBKLy1F4F8jLuKJiKBjjVFi1IavpoWbmqLwc github.com/ldez/usetesting v0.5.0/go.mod h1:Spnb4Qppf8JTuRgblLrEWb7IE6rDmUpGvxY3iRrzvDQ= github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84YrjT3mIY= github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA= -github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4= -github.com/lucasb-eyer/go-colorful v1.4.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/lucasb-eyer/go-colorful v1.4.1 h1:1EO+WB73+EH8EVbzlrG3KLAfEypQWVHIBqlTf+2hNss= +github.com/lucasb-eyer/go-colorful v1.4.1/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/macabu/inamedparam v0.2.0 h1:VyPYpOc10nkhI2qeNUdh3Zket4fcZjEWe35poddBCpE= github.com/macabu/inamedparam v0.2.0/go.mod h1:+Pee9/YfGe5LJ62pYXqB89lJ+0k5bsR8Wgz/C0Zlq3U= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= @@ -423,12 +428,12 @@ github.com/matoous/godox v1.1.0 h1:W5mqwbyWrwZv6OQ5Z1a/DHGMOvXYCBP3+Ht7KMoJhq4= github.com/matoous/godox v1.1.0/go.mod h1:jgE/3fUXiTurkdHOLT5WEkThTSuE7yxHv5iWPa80afs= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= -github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= -github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-colorable v0.1.15 h1:+u9SLTRGnXv73cEsnsmoZBom+dMU88B2M0aDcWy0/jY= +github.com/mattn/go-colorable v0.1.15/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.23 h1:7ykA0T0jkPpzSvMS5i9uoNn2Xy3R383f9HDx3RybWcw= -github.com/mattn/go-runewidth v0.0.23/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= +github.com/mattn/go-runewidth v0.0.24 h1:cpokDiIn0MGnhdHwuWnJBITySJ20QyNGnY2kR/ay2DU= +github.com/mattn/go-runewidth v0.0.24/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= 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/mgechev/revive v1.15.0 h1:vJ0HzSBzfNyPbHKolgiFjHxLek9KUijhqh42yGoqZ8Q= @@ -454,12 +459,12 @@ github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhK github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= -github.com/nunnatsa/ginkgolinter v0.23.0 h1:x3o4DGYOWbBMP/VdNQKgSj+25aJKx2Pe6lHr8gBcgf8= -github.com/nunnatsa/ginkgolinter v0.23.0/go.mod h1:9qN1+0akwXEccwV1CAcCDfcoBlWXHB+ML9884pL4SZ4= -github.com/onsi/ginkgo/v2 v2.28.2 h1:DTrMfpqxiNUyQ3Y0zhn1n3cOO2euFgQPYIpkWwxVFps= -github.com/onsi/ginkgo/v2 v2.28.2/go.mod h1:CLtbVInNckU3/+gC8LzkGUb9oF+e8W8TdUsxPwvdOgE= -github.com/onsi/gomega v1.39.1 h1:1IJLAad4zjPn2PsnhH70V4DKRFlrCzGBNrNaru+Vf28= -github.com/onsi/gomega v1.39.1/go.mod h1:hL6yVALoTOxeWudERyfppUcZXjMwIMLnuSfruD2lcfg= +github.com/nunnatsa/ginkgolinter v0.24.0 h1:Mp0EagluLFP98JatP6nqp/gGEoljNG97uf9AcxcBVy8= +github.com/nunnatsa/ginkgolinter v0.24.0/go.mod h1:2ZMRuzX6+3XXyY6UZOwb6n+MCocVGbkIsDBC4vuWz5c= +github.com/onsi/ginkgo/v2 v2.32.0 h1:Hw7s2pVrQo/8Yz5N77qdnpHaoc+c6cC9WIV1Jce+J6E= +github.com/onsi/ginkgo/v2 v2.32.0/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44= +github.com/onsi/gomega v1.42.1 h1:iN1rCUX+44NZ1Dc97MPoeFYbFR0vh8zxoxMFwKdyZ6I= +github.com/onsi/gomega v1.42.1/go.mod h1:REff/hsDsodHoKlWsP2mAPhu1+5/6hVYNf9rIEBpeSg= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= @@ -469,12 +474,11 @@ github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT9 github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= 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/pelletier/go-toml/v2 v2.3.1 h1:MYEvvGnQjeNkRF1qUuGolNtNExTDwct51yp7olPtrEc= -github.com/pelletier/go-toml/v2 v2.3.1/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= +github.com/pelletier/go-toml/v2 v2.4.3 h1:GTRvJQutkOSftxIFD5xw9aepkYNuPWmVJpffdDPYVpY= +github.com/pelletier/go-toml/v2 v2.4.3/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= 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/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -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/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= @@ -508,13 +512,13 @@ github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= -github.com/raeperd/recvcheck v0.2.0 h1:GnU+NsbiCqdC2XX5+vMZzP+jAJC5fht7rcVTAhX74UI= -github.com/raeperd/recvcheck v0.2.0/go.mod h1:n04eYkwIR0JbgD73wT8wL4JjPC3wm0nFtzBnWNocnYU= +github.com/raeperd/recvcheck v0.3.0 h1:PM+XYvyxIj3bo+kobJfFTdTuU3Lmfu96mKDbyHDbRt8= +github.com/raeperd/recvcheck v0.3.0/go.mod h1:PZNwG+HztFYMH2ZPq0Hu3QgkV2yiA6VrtNz9c1fXWJo= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/rogpeppe/go-internal v1.16.0 h1:O9DK+vNMDVGLr2BeZqmpLeMjiMNkuXfcqntWbZV6S5g= +github.com/rogpeppe/go-internal v1.16.0/go.mod h1:DrUVZyrJU+txYW5/1kwtXQSMFio52ZOxX7yM1VHvnxs= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryancurrah/gomodguard v1.4.1 h1:eWC8eUMNZ/wM/PWuZBv7JxxqT5fiIKSIyTvjb7Elr+g= github.com/ryancurrah/gomodguard v1.4.1/go.mod h1:qnMJwV1hX9m+YJseXEBhd2s90+1Xn6x9dLz11ualI1I= @@ -524,21 +528,21 @@ github.com/ryanrolds/sqlclosecheck v0.6.0 h1:pEyL9okISdg1F1SEpJNlrEotkTGerv5BMk7 github.com/ryanrolds/sqlclosecheck v0.6.0/go.mod h1:xyX16hsDaCMXHrMJ3JMzGf5OpDfHTOTTQrT7HOFUmeU= github.com/sanposhiho/wastedassign/v2 v2.1.0 h1:crurBF7fJKIORrV85u9UUpePDYGWnwvv3+A96WvwXT0= github.com/sanposhiho/wastedassign/v2 v2.1.0/go.mod h1:+oSmSC+9bQ+VUAxA66nBb0Z7N8CK7mscKTDYC6aIek4= -github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= -github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.3 h1:1EYB5IzjZawrrnELUi78f9fPu57HuXjmddZPjrls/28= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.3/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= github.com/sashamelentyev/usestdlibvars v1.29.0 h1:8J0MoRrw4/NAXtjQqTHrbW9NN+3iMf7Knkq057v4XOQ= github.com/sashamelentyev/usestdlibvars v1.29.0/go.mod h1:8PpnjHMk5VdeWlVb4wCdrB8PNbLqZ3wBZTZWkrpZZL8= -github.com/securego/gosec/v2 v2.26.1 h1:gdkttGhQFVehqRJ8grKH4DrpqM/QlPKNHBnl8QgcEC4= -github.com/securego/gosec/v2 v2.26.1/go.mod h1:57UW4p0uoP3kxoTkhoo3axLdVAi+OWrLg/Ax/kdqtPE= +github.com/securego/gosec/v2 v2.28.0 h1:ZsSdiDb0AtTpLFVol5z91gbMei9ZiLEPG/pZjZujp7c= +github.com/securego/gosec/v2 v2.28.0/go.mod h1:lb4/9AHe+lJy/kjWmWRWWsEipvbwGKuxf+tY1Pmjdnk= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= -github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= +github.com/sirupsen/logrus v1.10.1 h1:xi4336Zh11WpU14fXR6I67V3yaTPQYwRx2WEtHbRg4Q= +github.com/sirupsen/logrus v1.10.1/go.mod h1:vsQHnG7xzNsxk3NrwboUiWPnIC3dmbjcGPykD7+tiHk= github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= github.com/sonatard/noctx v0.5.1 h1:wklWg9c9ZYugOAk7qG4yP4PBrlQsmSLPTvW1K4PRQMs= @@ -565,13 +569,13 @@ github.com/stbenjam/no-sprintf-host-port v0.3.1 h1:AyX7+dxI4IdLBPtDbsGAyqiTSLpCP github.com/stbenjam/no-sprintf-host-port v0.3.1/go.mod h1:ODbZesTCHMVKthBHskvUUexdcNHAQRXk9NpSsL8p/HQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= +github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= 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/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= @@ -594,8 +598,8 @@ github.com/ultraware/whitespace v0.2.0 h1:TYowo2m9Nfj1baEQBjuHzvMRbp19i+RCcRYrSW github.com/ultraware/whitespace v0.2.0/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= github.com/uudashr/gocognit v1.2.1 h1:CSJynt5txTnORn/DkhiB4mZjwPuifyASC8/6Q0I/QS4= github.com/uudashr/gocognit v1.2.1/go.mod h1:acaubQc6xYlXFEMb9nWX2dYBzJ/bIjEkc1zzvyIZg5Q= -github.com/uudashr/iface v1.4.2 h1:06Vq5RKVYThBsj0Bnw4oasMjD1r+7CE/bcKOA8dVSvg= -github.com/uudashr/iface v1.4.2/go.mod h1:pbeBPlbuU2qkNDn0mmfrxP2X+wjPMIQAy+r1MBXSXtg= +github.com/uudashr/iface v1.5.0 h1:PgdMt4uAettGG8K/Kbamc4B9FABgUgnS3TLbl6fnjEk= +github.com/uudashr/iface v1.5.0/go.mod h1:pbeBPlbuU2qkNDn0mmfrxP2X+wjPMIQAy+r1MBXSXtg= github.com/xen0n/gosmopolitan v1.3.0 h1:zAZI1zefvo7gcpbCOrPSHJZJYA9ZgLfJqtKzZ5pHqQM= github.com/xen0n/gosmopolitan v1.3.0/go.mod h1:rckfr5T6o4lBtM1ga7mLGKZmLxswUoH1zxHgNXOsEt4= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= @@ -622,8 +626,8 @@ go-simpler.org/sloglint v0.12.0 h1:UzWDlLWNE5FLqsvyq3tWYHuQMbqrervOhT8qPl4Mmw4= go-simpler.org/sloglint v0.12.0/go.mod h1:jBjjC2bm8rYrs88oTRlFX497kWjJsyZWYoNaXkGRI6I= go.augendre.info/arangolint v0.4.0 h1:xSCZjRoS93nXazBSg5d0OGCi9APPLNMmmLrC995tR50= go.augendre.info/arangolint v0.4.0/go.mod h1:l+f/b4plABuFISuKnTGD4RioXiCCgghv2xqst/xOvAA= -go.augendre.info/fatcontext v0.9.0 h1:Gt5jGD4Zcj8CDMVzjOJITlSb9cEch54hjRRlN3qDojE= -go.augendre.info/fatcontext v0.9.0/go.mod h1:L94brOAT1OOUNue6ph/2HnwxoNlds9aXDF2FcUntbNw= +go.augendre.info/fatcontext v0.10.0 h1:HhFopmivh8U1+AU7f0kuwUeg2eiIns7YsGQOMHwSJ90= +go.augendre.info/fatcontext v0.10.0/go.mod h1:pqpGvA9GlrXy+aXkp8L2dKz12Zp4g2FhzcAtwToU+2w= 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= @@ -635,8 +639,9 @@ go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= 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-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -658,8 +663,8 @@ golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/y golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358 h1:qWFG1Dj7TBjOjOvhEOkmyGPVoquqUKnIU0lEVLp8xyk= -golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358/go.mod h1:4Mzdyp/6jzw9auFDJ3OMF5qksa7UvPnzKqTVGcb04ms= +golang.org/x/exp/typeparams v0.0.0-20260811152304-ee035b5b010f h1:+lI8cDJ4uceLipg2f1ODay7fEuLkk0BIHXd6PB8icxo= +golang.org/x/exp/typeparams v0.0.0-20260811152304-ee035b5b010f/go.mod h1:PqrXSW65cXDZH0k4IeUbhmg/bcAZDbzNz3byBpKCsXo= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -684,8 +689,8 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM= -golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU= +golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= +golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= 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= @@ -720,8 +725,8 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA= -golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs= +golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= +golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU= 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= @@ -741,8 +746,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= -golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= +golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= 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-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -783,13 +788,12 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI= -golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= +golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -801,8 +805,8 @@ 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.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg= -golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164= +golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs= +golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY= 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= @@ -853,8 +857,8 @@ golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0t golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c= -golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI= +golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= +golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= @@ -938,8 +942,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= -google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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= @@ -965,12 +969,12 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.7.0 h1:w6WUp1VbkqPEgLz4rkBzH/CSU6HkoqNLp6GstyTx3lU= -honnef.co/go/tools v0.7.0/go.mod h1:pm29oPxeP3P82ISxZDgIYeOaf9ta6Pi0EWvCFoLG2vc= -mvdan.cc/gofumpt v0.9.2 h1:zsEMWL8SVKGHNztrx6uZrXdp7AX8r421Vvp23sz7ik4= -mvdan.cc/gofumpt v0.9.2/go.mod h1:iB7Hn+ai8lPvofHd9ZFGVg2GOr8sBUw1QUWjNbmIL/s= -mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15 h1:ssMzja7PDPJV8FStj7hq9IKiuiKhgz9ErWw+m68e7DI= -mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15/go.mod h1:4M5MMXl2kW6fivUT6yRGpLLPNfuGtU2Z0cPvFquGDYU= +honnef.co/go/tools v0.8.0 h1:UacpzPr7D6i5BAjTkA7sNVcx4kIbhAZcQ4zYtKiXx68= +honnef.co/go/tools v0.8.0/go.mod h1:XA+OnlRA9EDh/ukGvXMNSZNKGwFQJ+5dER0ioUkOxks= +mvdan.cc/gofumpt v0.11.0 h1:0H01XB95PnN2QgCSR9ELdZyTlJqNZ7181B0BTMh5VZc= +mvdan.cc/gofumpt v0.11.0/go.mod h1:BeT5wCsOJt6J9zT2MZIOGszjUHzFkn1/l9g6xAzqsXo= +mvdan.cc/unparam v0.0.0-20260818115549-3f964bcb5673 h1:dEE6li4OPIE54oojY2qaayFS1fSp17G14si0gXRxl0U= +mvdan.cc/unparam v0.0.0-20260818115549-3f964bcb5673/go.mod h1:62roFV3D3nYOWIXv3PfGO4UYEKAotz2WgLywT87ONd8= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/tools/goyacc/go.mod b/tools/goyacc/go.mod index 6e42d166bb5..9107e620229 100644 --- a/tools/goyacc/go.mod +++ b/tools/goyacc/go.mod @@ -7,7 +7,7 @@ tool github.com/vitessio/goyacc require ( github.com/spf13/pflag v1.0.10 // indirect github.com/vitessio/goyacc v0.0.0-20260327210057-9f3cb834a13f // indirect - golang.org/x/mod v0.25.0 // indirect - golang.org/x/sync v0.12.0 // indirect - golang.org/x/tools v0.29.0 // indirect + golang.org/x/mod v0.39.0 // indirect + golang.org/x/sync v0.22.0 // indirect + golang.org/x/tools v0.49.0 // indirect ) diff --git a/tools/goyacc/go.sum b/tools/goyacc/go.sum index 25fd72d28fe..2a24f16e6b2 100644 --- a/tools/goyacc/go.sum +++ b/tools/goyacc/go.sum @@ -4,9 +4,9 @@ github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/vitessio/goyacc v0.0.0-20260327210057-9f3cb834a13f h1:lh3zCyphaNJe02YMDECWto/Oe+2TkfHmMFX6Da/fPN0= github.com/vitessio/goyacc v0.0.0-20260327210057-9f3cb834a13f/go.mod h1:DCqHWerHm+co1vHHWoePsfBOAvW3mRwE8W21xNlg0F4= -golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w= -golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= -golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= +golang.org/x/mod v0.39.0 h1:UF5zwQdCRRUpHfyPwr7d4UrGiVeldIsogtzWVnczL74= +golang.org/x/mod v0.39.0/go.mod h1:bvIbwjQ0HUFFf5AKukeeYQG4ZBUG9yxQbR9aEweIwYY= +golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= +golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= +golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= From 2133c3aa2f408b3fbb0572ade251dce5059c0eac Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Fri, 21 Aug 2026 14:55:20 +0000 Subject: [PATCH 3/4] More fixes Signed-off-by: Matt Lord --- examples/demo/demo.go | 39 ++++---- go/cmd/vtclient/cli/vtclient.go | 2 +- go/cmd/vtctl/vtctl.go | 2 +- go/cmd/vtctlclient/main.go | 2 +- go/mysql/binlog_event_filepos.go | 10 +- go/mysql/capabilities/capability.go | 2 +- go/mysql/client.go | 2 +- go/mysql/collations/charset/filename.go | 2 +- go/mysql/collations/internal/uca/collation.go | 6 +- go/mysql/collations/vindex/collate/collate.go | 2 +- .../vindex/unicode/norm/normalize.go | 2 +- go/mysql/datetime/datetime.go | 2 +- go/mysql/datetime/interval_test.go | 96 +++++++------------ go/mysql/icuregex/compiler.go | 6 +- go/mysql/server_test.go | 2 +- go/stats/counter.go | 8 +- go/stats/counters.go | 40 +++----- go/stats/duration.go | 10 +- .../prometheusbackend/prometheusbackend.go | 2 +- go/stats/timings.go | 10 +- go/test/endtoend/keyspace/keyspace_test.go | 2 +- .../disk_health_monitor/fuse_helper/main.go | 10 +- .../autogenerate/convert_grep_to_fuzzer.go | 4 +- go/trace/fake.go | 2 + go/viperutil/get_func.go | 2 +- go/vt/grpcoptionaltls/optionaltls.go | 2 +- go/vt/hook/hook.go | 6 +- go/vt/log/prefixed.go | 2 + go/vt/logutil/throttled.go | 2 +- go/vt/mysqlctl/builtinbackupengine.go | 36 ++++--- go/vt/mysqlctl/mysqlshellbackupengine.go | 32 +++---- go/vt/mysqlctl/schema.go | 2 +- go/vt/mysqlctl/xtrabackupengine.go | 32 +++---- go/vt/schema/online_ddl_test.go | 10 +- .../grpc_server_auth_static_bench_test.go | 10 +- go/vt/servenv/metrics.go | 37 ------- go/vt/servenv/metrics_linux.go | 20 +++- go/vt/servenv/metrics_nonlinux.go | 16 +++- go/vt/sidecardb/sidecardb.go | 2 +- go/vt/throttler/throttler_test.go | 23 ++--- go/vt/tlstest/tlstest.go | 3 +- go/vt/topo/consultopo/error.go | 3 +- go/vt/topo/errors.go | 4 +- go/vt/topo/etcd2topo/error.go | 3 +- go/vt/topo/etcd2topo/watch.go | 16 ++-- go/vt/topo/memorytopo/file.go | 20 ++-- go/vt/topo/memorytopo/watch.go | 10 +- go/vt/topo/zk2topo/version.go | 2 +- go/vt/topo/zk2topo/zk_conn.go | 2 +- .../topotools/events/reparent_syslog_test.go | 5 +- go/vt/vitessdriver/driver_test.go | 2 +- .../cluster/discovery/discovery_dynamic.go | 4 +- .../discovery/discovery_static_file.go | 4 +- go/vt/vtctl/reparentutil/replication.go | 3 +- go/vt/vtctl/vtctl.go | 4 +- go/vt/vtctl/workflow/stream_migrator_test.go | 22 ++--- go/vt/vtctl/workflow/traffic_switcher.go | 19 ++-- go/vt/vterrors/errors_test.go | 2 +- go/vt/vterrors/vterrors.go | 3 +- go/vt/vtgate/engine/insert.go | 20 ++-- go/vt/vtgate/engine/insert_select.go | 10 +- go/vt/vtgate/evalengine/api_hash_test.go | 2 +- go/vt/vtgate/evalengine/expr_env_test.go | 8 +- go/vt/vtgate/evalengine/expr_tuple.go | 4 +- go/vt/vtgate/evalengine/fn_regexp.go | 3 +- go/vt/vtgate/evalengine/translate.go | 16 ++-- go/vt/vtgate/evalengine/translate_builtin.go | 74 ++++++-------- go/vt/vtgate/planbuilder/ddl.go | 22 +++-- go/vt/vtgate/planbuilder/insert.go | 10 +- .../planbuilder/operator_transformers.go | 16 ++-- .../planbuilder/operators/route_planning.go | 2 +- .../operators/route_planning_test.go | 8 +- go/vt/vtgate/planbuilder/plan_test_vindex.go | 1 + go/vt/vtgate/semantics/dependencies.go | 16 ++-- go/vt/vtgate/semantics/foreign_keys_test.go | 6 +- go/vt/vtgate/semantics/table_set_test.go | 12 +-- .../vtgate/vindexes/consistent_lookup_test.go | 2 +- go/vt/vtgate/vindexes/vschema_test.go | 15 ++- go/vt/vtorc/inst/analysis.go | 5 +- go/vt/vtorc/inst/instance.go | 5 +- .../grpctmclient/cached_client_flaky_test.go | 2 +- go/vt/vttablet/onlineddl/executor.go | 6 +- .../tabletmanager/rpc_vreplication_test.go | 6 +- .../tabletmanager/vreplication/vcopier.go | 3 +- .../vttablet/tabletserver/dt_executor_test.go | 20 ++-- .../tabletserver/query_executor_test.go | 64 +++++-------- .../tabletserver/throttle/base/http.go | 1 - go/vt/wrangler/traffic_switcher.go | 19 ++-- go/vt/wrangler/vdiff.go | 7 +- go/vtbench/vtbench.go | 3 +- test.go | 4 +- .../map-shard-for-value_test.go | 2 +- tools/rowlog/rowlog.go | 2 +- 93 files changed, 444 insertions(+), 582 deletions(-) delete mode 100644 go/vt/servenv/metrics.go diff --git a/examples/demo/demo.go b/examples/demo/demo.go index 0627d2aaca3..958d096c4a7 100644 --- a/examples/demo/demo.go +++ b/examples/demo/demo.go @@ -62,27 +62,25 @@ func main() { func runCluster() { cluster = &vttest.LocalCluster{ - Config: vttest.Config{ - Topology: &vttestpb.VTTestTopology{ - Keyspaces: []*vttestpb.Keyspace{{ - Name: "customer", - Shards: []*vttestpb.Shard{{ - Name: "-80", - }, { - Name: "80-", - }}, + Topology: &vttestpb.VTTestTopology{ + Keyspaces: []*vttestpb.Keyspace{{ + Name: "customer", + Shards: []*vttestpb.Shard{{ + Name: "-80", }, { - Name: "product", - Shards: []*vttestpb.Shard{{ - Name: "0", - }}, + Name: "80-", }}, - }, - SchemaDir: path.Join(os.Getenv("VTROOT"), "examples/demo/schema"), - MySQLBindHost: "0.0.0.0", - // VSchemaDDLAuthorizedUsers allows you to experiment with vschema DDLs. - VSchemaDDLAuthorizedUsers: "%", + }, { + Name: "product", + Shards: []*vttestpb.Shard{{ + Name: "0", + }}, + }}, }, + SchemaDir: path.Join(os.Getenv("VTROOT"), "examples/demo/schema"), + MySQLBindHost: "0.0.0.0", + // VSchemaDDLAuthorizedUsers allows you to experiment with vschema DDLs. + VSchemaDDLAuthorizedUsers: "%", } env, err := vttest.NewLocalTestEnv(12345) if err != nil { @@ -232,21 +230,20 @@ func resultToMap(title string, qr *sqltypes.Result) map[string]any { func streamQuerylog(port int) (<-chan string, error) { request := fmt.Sprintf("http://localhost:%d/debug/querylog", port) - resp, err := http.Get(request) + resp, err := http.Get(request) //nolint:bodyclose // the body is closed by the reader goroutine below if err != nil { log.Error(fmt.Sprintf("Error reading stream: %v: %v", request, err)) return nil, err } - defer resp.Body.Close() ch := make(chan string, 100) go func() { + defer resp.Body.Close() buffered := bufio.NewReader(resp.Body) for { str, err := buffered.ReadString('\n') if err != nil { log.Error(fmt.Sprintf("Error reading stream: %v: %v", request, err)) close(ch) - resp.Body.Close() return } splits := strings.Split(str, "\t") diff --git a/go/cmd/vtclient/cli/vtclient.go b/go/cmd/vtclient/cli/vtclient.go index 912ad498504..05eabaa95f9 100644 --- a/go/cmd/vtclient/cli/vtclient.go +++ b/go/cmd/vtclient/cli/vtclient.go @@ -319,7 +319,7 @@ func execNonDml(ctx context.Context, db *sql.DB, sql string) (*results, error) { // unpack []*string into []string vals := make([]string, 0, len(row)) for _, value := range row { - vals = append(vals, *(value.(*string))) + vals = append(vals, *value.(*string)) } qr.Rows = append(qr.Rows, vals) } diff --git a/go/cmd/vtctl/vtctl.go b/go/cmd/vtctl/vtctl.go index d5d8b342533..5f238170eaf 100644 --- a/go/cmd/vtctl/vtctl.go +++ b/go/cmd/vtctl/vtctl.go @@ -124,7 +124,7 @@ func main() { logSyslog(startMsg) closer := trace.StartTracing("vtctl") - defer trace.LogErrorsWhenClosing(closer) + defer trace.LogErrorsWhenClosing(closer)() servenv.FireRunHooks() diff --git a/go/cmd/vtctlclient/main.go b/go/cmd/vtctlclient/main.go index 0358e5dbe6f..35c612908be 100644 --- a/go/cmd/vtctlclient/main.go +++ b/go/cmd/vtctlclient/main.go @@ -80,7 +80,7 @@ func main() { args := servenv.ParseFlagsWithArgs("vtctlclient") closer := trace.StartTracing("vtctlclient") - defer trace.LogErrorsWhenClosing(closer) + defer trace.LogErrorsWhenClosing(closer)() logger := logutil.NewConsoleLogger() diff --git a/go/mysql/binlog_event_filepos.go b/go/mysql/binlog_event_filepos.go index 13d60d0e522..3337ce5e0e2 100644 --- a/go/mysql/binlog_event_filepos.go +++ b/go/mysql/binlog_event_filepos.go @@ -108,10 +108,8 @@ type filePosQueryEvent struct { func newFilePosQueryEvent(query string, ts uint32) filePosQueryEvent { return filePosQueryEvent{ - query: query, - filePosFakeEvent: filePosFakeEvent{ - timestamp: ts, - }, + query: query, + timestamp: ts, } } @@ -294,9 +292,7 @@ type filePosGTIDEvent struct { func newFilePosGTIDEvent(file string, pos uint64, timestamp uint32) filePosGTIDEvent { return filePosGTIDEvent{ - filePosFakeEvent: filePosFakeEvent{ - timestamp: timestamp, - }, + timestamp: timestamp, gtid: replication.FilePosGTID{ File: file, Pos: pos, diff --git a/go/mysql/capabilities/capability.go b/go/mysql/capabilities/capability.go index 04621c20b89..e465ee81833 100644 --- a/go/mysql/capabilities/capability.go +++ b/go/mysql/capabilities/capability.go @@ -62,7 +62,7 @@ func ServerVersionAtLeast(serverVersion string, parts ...int) (bool, error) { if serverVersion == "" { return false, ErrUnspecifiedServerVersion } - versionPrefix := strings.Split(serverVersion, "-")[0] + versionPrefix, _, _ := strings.Cut(serverVersion, "-") versionTokens := strings.Split(versionPrefix, ".") for i, part := range parts { if len(versionTokens) <= i { diff --git a/go/mysql/client.go b/go/mysql/client.go index b329ff05d2b..d28bed11c8e 100644 --- a/go/mysql/client.go +++ b/go/mysql/client.go @@ -235,7 +235,7 @@ func (c *Conn) clientHandshake(params *ConnParams, attributes ConnectionAttribut // later in the protocol. c.Capabilities = 0 if !params.DisableClientDeprecateEOF { - c.Capabilities = capabilities & (CapabilityClientDeprecateEOF) + c.Capabilities = capabilities & CapabilityClientDeprecateEOF } // Handle switch to SSL if necessary. diff --git a/go/mysql/collations/charset/filename.go b/go/mysql/collations/charset/filename.go index ea77c5d3305..66ab84a29f0 100644 --- a/go/mysql/collations/charset/filename.go +++ b/go/mysql/collations/charset/filename.go @@ -112,7 +112,7 @@ func TablenameToFilename(name string) string { b.WriteByte(hexSequence[(wc>>12)&15]) b.WriteByte(hexSequence[(wc>>8)&15]) b.WriteByte(hexSequence[(wc>>4)&15]) - b.WriteByte(hexSequence[(wc)&15]) + b.WriteByte(hexSequence[wc&15]) } return b.String() } diff --git a/go/mysql/collations/internal/uca/collation.go b/go/mysql/collations/internal/uca/collation.go index 5f11e8464a1..96a8bfdb9f4 100644 --- a/go/mysql/collations/internal/uca/collation.go +++ b/go/mysql/collations/internal/uca/collation.go @@ -86,18 +86,18 @@ func NewCollation(name string, weights Weights, weightPatches []Patch, reorder [ switch { case coll.param == nil && len(weightPatches) == 0 && coll.contract == nil: coll.iterpool.New = func() any { - return &FastIterator900{iterator900: iterator900{Collation900: coll}} + return &FastIterator900{Collation900: coll} } case name == "utf8mb4_ja_0900_as_cs_ks" || name == "utf8mb4_ja_0900_as_cs": coll.iterpool.New = func() any { - return &jaIterator900{iterator900: iterator900{Collation900: coll}} + return &jaIterator900{Collation900: coll} } case name == "utf8mb4_zh_0900_as_cs": coll.implicits = unicodeImplicitChineseWeights fallthrough default: coll.iterpool.New = func() any { - return &slowIterator900{iterator900: iterator900{Collation900: coll}} + return &slowIterator900{Collation900: coll} } } diff --git a/go/mysql/collations/vindex/collate/collate.go b/go/mysql/collations/vindex/collate/collate.go index 1266af25cc0..53f31397ac3 100644 --- a/go/mysql/collations/vindex/collate/collate.go +++ b/go/mysql/collations/vindex/collate/collate.go @@ -8,7 +8,7 @@ // Package collate contains types for comparing and sorting Unicode strings // according to a given collation order. -package collate // import "vitess.io/vitess/go/mysql/collations/vindex/collate" +package collate import ( "hash" diff --git a/go/mysql/collations/vindex/unicode/norm/normalize.go b/go/mysql/collations/vindex/unicode/norm/normalize.go index 360aeb9a6ac..893575618de 100644 --- a/go/mysql/collations/vindex/unicode/norm/normalize.go +++ b/go/mysql/collations/vindex/unicode/norm/normalize.go @@ -7,7 +7,7 @@ //go:generate go test -tags test // Package norm contains types and functions for normalizing Unicode strings. -package norm // import "vitess.io/vitess/go/mysql/collations/vindex/unicode/norm" +package norm import ( "unicode/utf8" diff --git a/go/mysql/datetime/datetime.go b/go/mysql/datetime/datetime.go index 973c79b44c3..1055f1e1901 100644 --- a/go/mysql/datetime/datetime.go +++ b/go/mysql/datetime/datetime.go @@ -587,7 +587,7 @@ func (dt DateTime) Round(p int) (r DateTime) { r = dt if n == 1e9 { r.Time.nanosecond = 0 - r.addInterval(&Interval{timeparts: timeparts{sec: 1}, unit: IntervalSecond}) + r.addInterval(&Interval{sec: 1, unit: IntervalSecond}) } else { r.Time.nanosecond = uint32(n) } diff --git a/go/mysql/datetime/interval_test.go b/go/mysql/datetime/interval_test.go index 22b4617656b..7e51caf2efa 100644 --- a/go/mysql/datetime/interval_test.go +++ b/go/mysql/datetime/interval_test.go @@ -87,10 +87,8 @@ func TestParseInterval(t *testing.T) { in: "123", tt: IntervalSecond, want: &Interval{ - timeparts: timeparts{ - sec: 123, - prec: 6, - }, + sec: 123, + prec: 6, unit: IntervalSecond, }, }, @@ -98,10 +96,8 @@ func TestParseInterval(t *testing.T) { in: "1", tt: IntervalDay, want: &Interval{ - timeparts: timeparts{ - day: 1, - prec: 0, - }, + day: 1, + prec: 0, unit: IntervalDay, }, }, @@ -109,10 +105,8 @@ func TestParseInterval(t *testing.T) { in: "1234", tt: IntervalMinute, want: &Interval{ - timeparts: timeparts{ - min: 1234, - prec: 0, - }, + min: 1234, + prec: 0, unit: IntervalMinute, }, }, @@ -120,11 +114,9 @@ func TestParseInterval(t *testing.T) { in: "123.98", tt: IntervalSecond, want: &Interval{ - timeparts: timeparts{ - sec: 123, - nsec: 980000000, - prec: 6, - }, + sec: 123, + nsec: 980000000, + prec: 6, unit: IntervalSecond, }, }, @@ -138,10 +130,8 @@ func TestParseInterval(t *testing.T) { // Neg interval case res := ParseInterval("123", IntervalSecond, true) want := &Interval{ - timeparts: timeparts{ - sec: -123, - prec: 6, - }, + sec: -123, + prec: 6, unit: IntervalSecond, } assert.Equal(t, want, res) @@ -157,10 +147,8 @@ func TestParseIntervalInt64(t *testing.T) { in: 123, tt: IntervalSecond, want: &Interval{ - timeparts: timeparts{ - sec: 123, - prec: 0, - }, + sec: 123, + prec: 0, unit: IntervalSecond, }, }, @@ -168,10 +156,8 @@ func TestParseIntervalInt64(t *testing.T) { in: 1234, tt: IntervalMicrosecond, want: &Interval{ - timeparts: timeparts{ - nsec: 1234000, - prec: 6, - }, + nsec: 1234000, + prec: 6, unit: IntervalMicrosecond, }, }, @@ -179,10 +165,8 @@ func TestParseIntervalInt64(t *testing.T) { in: 35454, tt: IntervalMinute, want: &Interval{ - timeparts: timeparts{ - min: 35454, - prec: 0, - }, + min: 35454, + prec: 0, unit: IntervalMinute, }, }, @@ -196,10 +180,8 @@ func TestParseIntervalInt64(t *testing.T) { // Neg interval case res := ParseIntervalInt64(123, IntervalSecond, true) want := &Interval{ - timeparts: timeparts{ - sec: -123, - prec: 0, - }, + sec: -123, + prec: 0, unit: IntervalSecond, } assert.Equal(t, want, res) @@ -215,11 +197,9 @@ func TestParseIntervalFloat(t *testing.T) { in: 123.45, tt: IntervalSecond, want: &Interval{ - timeparts: timeparts{ - sec: 123, - nsec: 450000000, - prec: 6, - }, + sec: 123, + nsec: 450000000, + prec: 6, unit: IntervalSecond, }, }, @@ -227,10 +207,8 @@ func TestParseIntervalFloat(t *testing.T) { in: 12.34, tt: IntervalMinute, want: &Interval{ - timeparts: timeparts{ - min: 12, - prec: 0, - }, + min: 12, + prec: 0, unit: IntervalMinute, }, }, @@ -238,10 +216,8 @@ func TestParseIntervalFloat(t *testing.T) { in: 12.67, tt: IntervalHour, want: &Interval{ - timeparts: timeparts{ - hour: 13, - prec: 0, - }, + hour: 13, + prec: 0, unit: IntervalHour, }, }, @@ -249,10 +225,8 @@ func TestParseIntervalFloat(t *testing.T) { in: 12.67, tt: IntervalMicrosecond, want: &Interval{ - timeparts: timeparts{ - nsec: 13000, - prec: 6, - }, + nsec: 13000, + prec: 6, unit: IntervalMicrosecond, }, }, @@ -260,10 +234,8 @@ func TestParseIntervalFloat(t *testing.T) { in: 123, tt: IntervalDay, want: &Interval{ - timeparts: timeparts{ - day: 123, - prec: 0, - }, + day: 123, + prec: 0, unit: IntervalDay, }, }, @@ -280,11 +252,9 @@ func TestParseIntervalFloat(t *testing.T) { // Neg interval case res := ParseIntervalFloat(123.4, IntervalSecond, true) want := &Interval{ - timeparts: timeparts{ - sec: -123, - nsec: -400000000, - prec: 6, - }, + sec: -123, + nsec: -400000000, + prec: 6, unit: IntervalSecond, } assert.Equal(t, want, res) diff --git a/go/mysql/icuregex/compiler.go b/go/mysql/icuregex/compiler.go index 37f57493451..b0462d09160 100644 --- a/go/mysql/icuregex/compiler.go +++ b/go/mysql/icuregex/compiler.go @@ -2093,7 +2093,7 @@ func (c *compiler) matchStartType() { jmpDest := op.value() if jmpDest > loc { if currentLen < forwardedLength[jmpDest] { - forwardedLength[jmpDest] = (currentLen) + forwardedLength[jmpDest] = currentLen } } atStart = false @@ -2204,7 +2204,7 @@ func (c *compiler) matchStartType() { jmpDest := op.value() if jmpDest > loc { if currentLen < forwardedLength[jmpDest] { - forwardedLength[jmpDest] = (currentLen) + forwardedLength[jmpDest] = currentLen } } } @@ -2756,7 +2756,7 @@ var invariantChars = [...]uint32{ } func ucharIsInvariant(c rune) bool { - return c <= 0x7f && (invariantChars[(c)>>5]&(uint32(1)<<(c&0x1f))) != 0 + return c <= 0x7f && (invariantChars[c>>5]&(uint32(1)<<(c&0x1f))) != 0 } func (c *compiler) setPushOp(op setOperation) { diff --git a/go/mysql/server_test.go b/go/mysql/server_test.go index 1ff9097397d..484f1e7caa4 100644 --- a/go/mysql/server_test.go +++ b/go/mysql/server_test.go @@ -1639,7 +1639,7 @@ func TestServerFlush(t *testing.T) { flds, err := c.Fields() require.NoError(t, err) if duration, want := time.Since(start), 20*time.Millisecond; duration < mysqlServerFlushDelay || duration > want { - assert.Fail(t, "duration out of expected range", "duration: %v, want between %v and %v", duration.String(), (mysqlServerFlushDelay).String(), want.String()) + assert.Fail(t, "duration out of expected range", "duration: %v, want between %v and %v", duration.String(), mysqlServerFlushDelay.String(), want.String()) } want1 := []*querypb.Field{{ Name: "result", diff --git a/go/stats/counter.go b/go/stats/counter.go index 7b02abe58ea..30bc6467dad 100644 --- a/go/stats/counter.go +++ b/go/stats/counter.go @@ -128,7 +128,7 @@ type Gauge struct { // NewGauge creates a new Gauge and publishes it if name is set. func NewGauge(name string, help string) *Gauge { - v := &Gauge{Counter: Counter{help: help}} + v := &Gauge{help: help} if name != "" { publish(name, v) @@ -158,10 +158,8 @@ type GaugeFunc struct { // set. func NewGaugeFunc(name string, help string, f func() int64) *GaugeFunc { i := &GaugeFunc{ - CounterFunc: CounterFunc{ - F: f, - help: help, - }, + F: f, + help: help, } if name != "" { diff --git a/go/stats/counters.go b/go/stats/counters.go index 0d4a453a31a..1046d2322f9 100644 --- a/go/stats/counters.go +++ b/go/stats/counters.go @@ -130,10 +130,8 @@ type CountersWithSingleLabel struct { // used by Prometheus, but not by the expvar package. func NewCountersWithSingleLabel(name, help, label string, tags ...string) *CountersWithSingleLabel { c := &CountersWithSingleLabel{ - counters: counters{ - counts: make(map[string]*atomic.Int64), - help: help, - }, + counts: make(map[string]*atomic.Int64), + help: help, label: label, labelCombined: IsDimensionCombined(label), } @@ -190,10 +188,8 @@ type CountersWithMultiLabels struct { // instance, and publishes it if name is set. func NewCountersWithMultiLabels(name, help string, labels []string) *CountersWithMultiLabels { t := &CountersWithMultiLabels{ - counters: counters{ - counts: make(map[string]*atomic.Int64), - help: help, - }, + counts: make(map[string]*atomic.Int64), + help: help, labels: labels, combinedLabels: make([]bool, len(labels)), } @@ -321,13 +317,9 @@ type GaugesWithSingleLabel struct { // publishes it if the name is set. func NewGaugesWithSingleLabel(name, help, label string, tags ...string) *GaugesWithSingleLabel { g := &GaugesWithSingleLabel{ - CountersWithSingleLabel: CountersWithSingleLabel{ - counters: counters{ - counts: make(map[string]*atomic.Int64), - help: help, - }, - label: label, - }, + counts: make(map[string]*atomic.Int64), + help: help, + label: label, } for _, tag := range tags { @@ -377,13 +369,9 @@ type GaugesWithMultiLabels struct { // and publishes it if name is set. func NewGaugesWithMultiLabels(name, help string, labels []string) *GaugesWithMultiLabels { t := &GaugesWithMultiLabels{ - CountersWithMultiLabels: CountersWithMultiLabels{ - counters: counters{ - counts: make(map[string]*atomic.Int64), - help: help, - }, - labels: labels, - }, + counts: make(map[string]*atomic.Int64), + help: help, + labels: labels, } if name != "" { publish(name, t) @@ -428,11 +416,9 @@ type GaugesFuncWithMultiLabels struct { // mapping to the provided function. func NewGaugesFuncWithMultiLabels(name, help string, labels []string, f func() map[string]int64) *GaugesFuncWithMultiLabels { t := &GaugesFuncWithMultiLabels{ - CountersFuncWithMultiLabels: CountersFuncWithMultiLabels{ - f: f, - help: help, - labels: labels, - }, + f: f, + help: help, + labels: labels, } if name != "" { diff --git a/go/stats/duration.go b/go/stats/duration.go index 9bfb39e7c1d..898a7ec1d63 100644 --- a/go/stats/duration.go +++ b/go/stats/duration.go @@ -67,9 +67,7 @@ type GaugeDuration struct { // NewGaugeDuration returns a new GaugeDuration. func NewGaugeDuration(name, help string) *GaugeDuration { gd := &GaugeDuration{ - CounterDuration: CounterDuration{ - help: help, - }, + help: help, } publish(name, gd) return gd @@ -124,10 +122,8 @@ type GaugeDurationFunc struct { // publishes it if name is set. func NewGaugeDurationFunc(name string, help string, f func() time.Duration) *GaugeDurationFunc { gf := &GaugeDurationFunc{ - CounterDurationFunc: CounterDurationFunc{ - F: f, - help: help, - }, + F: f, + help: help, } if name != "" { diff --git a/go/stats/prometheusbackend/prometheusbackend.go b/go/stats/prometheusbackend/prometheusbackend.go index 1c3c4cd22d7..8ef31cf4a00 100644 --- a/go/stats/prometheusbackend/prometheusbackend.go +++ b/go/stats/prometheusbackend/prometheusbackend.go @@ -93,7 +93,7 @@ func (be PromBackend) publishPrometheusMetric(name string, v expvar.Var) { case *stats.GaugeFunc: newMetricFuncCollector(st, be.buildPromName(name), prometheus.GaugeValue, func() float64 { return float64(st.F()) }) case stats.FloatFunc: - newMetricFuncCollector(st, be.buildPromName(name), prometheus.GaugeValue, func() float64 { return (st)() }) + newMetricFuncCollector(st, be.buildPromName(name), prometheus.GaugeValue, func() float64 { return st() }) case *stats.CountersWithSingleLabel: newCountersWithSingleLabelCollector(st, be.buildPromName(name), st.Label(), prometheus.CounterValue) case *stats.CountersWithMultiLabels: diff --git a/go/stats/timings.go b/go/stats/timings.go index aea67428a25..a1f30f5fd62 100644 --- a/go/stats/timings.go +++ b/go/stats/timings.go @@ -208,12 +208,10 @@ func NewMultiTimings(name string, help string, labels []string) *MultiTimings { combinedLabels[i] = IsDimensionCombined(label) } t := &MultiTimings{ - Timings: Timings{ - histograms: make(map[string]*Histogram), - name: name, - help: help, - label: safeJoinLabels(labels, combinedLabels), - }, + histograms: make(map[string]*Histogram), + name: name, + help: help, + label: safeJoinLabels(labels, combinedLabels), labels: labels, combinedLabels: combinedLabels, } diff --git a/go/test/endtoend/keyspace/keyspace_test.go b/go/test/endtoend/keyspace/keyspace_test.go index ba84d920073..46fbe57335e 100644 --- a/go/test/endtoend/keyspace/keyspace_test.go +++ b/go/test/endtoend/keyspace/keyspace_test.go @@ -419,7 +419,7 @@ func TestKeyspaceToShardName(t *testing.T) { func packKeyspaceID(keyspaceID uint64) []byte { var keybytes [8]byte binary.BigEndian.PutUint64(keybytes[:], keyspaceID) - return (keybytes[:]) + return keybytes[:] } func getSrvKeyspace(t *testing.T, cell string, ksname string) *topodatapb.SrvKeyspace { diff --git a/go/test/endtoend/tabletmanager/disk_health_monitor/fuse_helper/main.go b/go/test/endtoend/tabletmanager/disk_health_monitor/fuse_helper/main.go index 8b92a8f49a1..3d9ffc7eb60 100644 --- a/go/test/endtoend/tabletmanager/disk_health_monitor/fuse_helper/main.go +++ b/go/test/endtoend/tabletmanager/disk_health_monitor/fuse_helper/main.go @@ -103,7 +103,7 @@ type gatedNode struct { } func newGatedNode(rootData *fs.LoopbackRoot, _ *fs.Inode, _ string, _ *syscall.Stat_t) fs.InodeEmbedder { - return &gatedNode{LoopbackNode: fs.LoopbackNode{RootData: rootData}} + return &gatedNode{RootData: rootData} } func (n *gatedNode) Create(ctx context.Context, name string, flags, mode uint32, out *fuse.EntryOut) (*fs.Inode, fs.FileHandle, uint32, syscall.Errno) { @@ -178,16 +178,14 @@ func main() { root := &fs.LoopbackRoot{ Path: *backing, Dev: uint64(st.Dev), - NewNode: newGatedNode, + NewNode: newGatedNode, //nolint:staticcheck // SA1019: migrating to NodeWrapChilder is a larger change for this test helper } rootNode := newGatedNode(root, nil, "", &st) root.RootNode = rootNode opts := &fs.Options{ - MountOptions: fuse.MountOptions{ - FsName: *backing, - Name: "vitess-disk-health-monitor-test", - }, + FsName: *backing, + Name: "vitess-disk-health-monitor-test", } server, err := fs.Mount(*mountPoint, rootNode, opts) diff --git a/go/test/fuzzing/autogenerate/convert_grep_to_fuzzer.go b/go/test/fuzzing/autogenerate/convert_grep_to_fuzzer.go index 52b998bdc8c..55ec5fae328 100644 --- a/go/test/fuzzing/autogenerate/convert_grep_to_fuzzer.go +++ b/go/test/fuzzing/autogenerate/convert_grep_to_fuzzer.go @@ -230,7 +230,7 @@ func getGrepData() ([]string, []string) { for scanner.Scan() { line := scanner.Text() if strings.Contains(line, "func (") { - thePath := strings.Split(line, ":")[0] + thePath, _, _ := strings.Cut(line, ":") if !contains(paths, thePath) { paths = append(paths, thePath) } @@ -240,7 +240,7 @@ func getGrepData() ([]string, []string) { } // get name of target struct - structName := strings.Split(targetStructTemp[1], ") ")[0] + structName, _, _ := strings.Cut(targetStructTemp[1], ") ") // get import path and short name importPath := pathToImportPath[thePath] diff --git a/go/trace/fake.go b/go/trace/fake.go index fee0b616f71..7de9d06bc78 100644 --- a/go/trace/fake.go +++ b/go/trace/fake.go @@ -32,7 +32,9 @@ func (noopTracingServer) FromContext(context.Context) (Span, bool) { return nil, func (noopTracingServer) NewFromString(ctx context.Context, parent, label string) (Span, context.Context, error) { return NoopSpan{}, ctx, nil } + func (noopTracingServer) NewContext(parent context.Context, _ Span) context.Context { return parent } + func (noopTracingServer) AddGrpcServerOptions(addInterceptors func(s grpc.StreamServerInterceptor, u grpc.UnaryServerInterceptor)) { } diff --git a/go/viperutil/get_func.go b/go/viperutil/get_func.go index 303706fec9b..02eabbb3170 100644 --- a/go/viperutil/get_func.go +++ b/go/viperutil/get_func.go @@ -171,7 +171,7 @@ func GetFuncForType[T any]() func(v *viper.Viper) func(key string) T { f = func(v *viper.Viper) func(key string) T { getPointer := f2(v) return func(key string) T { - return *(getPointer(key)) + return *getPointer(key) } } } diff --git a/go/vt/grpcoptionaltls/optionaltls.go b/go/vt/grpcoptionaltls/optionaltls.go index 32e3eda644a..28aa7a2c7d5 100755 --- a/go/vt/grpcoptionaltls/optionaltls.go +++ b/go/vt/grpcoptionaltls/optionaltls.go @@ -41,7 +41,7 @@ func (c *optionalTLSCreds) ServerHandshake(conn net.Conn) (net.Conn, credentials } authInfo := info{ - CommonAuthInfo: credentials.CommonAuthInfo{SecurityLevel: credentials.NoSecurity}, + SecurityLevel: credentials.NoSecurity, } return wc, authInfo, nil diff --git a/go/vt/hook/hook.go b/go/vt/hook/hook.go index daaf7909b8e..cc4b814c669 100644 --- a/go/vt/hook/hook.go +++ b/go/vt/hook/hook.go @@ -181,7 +181,7 @@ func (hook *Hook) ExecuteContext(ctx context.Context) (result *HookResult) { return result } - if cmd.ProcessState != nil && cmd.ProcessState.Sys() != nil { + if cmd.ProcessState != nil { result.ExitStatus = cmd.ProcessState.Sys().(syscall.WaitStatus).ExitStatus() } else { result.ExitStatus = HOOK_CANNOT_GET_EXIT_STATUS @@ -239,7 +239,7 @@ func (hook *Hook) ExecuteAsWritePipe(out io.Writer) (io.WriteCloser, WaitFunc, i err = cmd.Start() if err != nil { status = HOOK_CANNOT_GET_EXIT_STATUS - if cmd.ProcessState != nil && cmd.ProcessState.Sys() != nil { + if cmd.ProcessState != nil { status = cmd.ProcessState.Sys().(syscall.WaitStatus).ExitStatus() } return nil, nil, status, err @@ -278,7 +278,7 @@ func (hook *Hook) ExecuteAsReadPipe(in io.Reader) (io.Reader, WaitFunc, int, err err = cmd.Start() if err != nil { status = HOOK_CANNOT_GET_EXIT_STATUS - if cmd.ProcessState != nil && cmd.ProcessState.Sys() != nil { + if cmd.ProcessState != nil { status = cmd.ProcessState.Sys().(syscall.WaitStatus).ExitStatus() } return nil, nil, status, err diff --git a/go/vt/log/prefixed.go b/go/vt/log/prefixed.go index 0e073a73ec0..66017807bb1 100644 --- a/go/vt/log/prefixed.go +++ b/go/vt/log/prefixed.go @@ -27,7 +27,9 @@ func NewPrefixedLogger(prefix string) *PrefixedLogger { } func (pl *PrefixedLogger) Info(msg string, attrs ...slog.Attr) { InfoDepth(1, pl.prefix+msg, attrs...) } + func (pl *PrefixedLogger) Warn(msg string, attrs ...slog.Attr) { WarnDepth(1, pl.prefix+msg, attrs...) } + func (pl *PrefixedLogger) Error(msg string, attrs ...slog.Attr) { ErrorDepth(1, pl.prefix+msg, attrs...) } diff --git a/go/vt/logutil/throttled.go b/go/vt/logutil/throttled.go index 314b2969338..3f4ca47d83f 100644 --- a/go/vt/logutil/throttled.go +++ b/go/vt/logutil/throttled.go @@ -66,7 +66,7 @@ func (tl *ThrottledLogger) log(logF logFunc, format string, v ...any) { tl.mu.Lock() defer tl.mu.Unlock() - logWaitTime := tl.maxInterval - (now.Sub(tl.lastlogTime)) + logWaitTime := tl.maxInterval - now.Sub(tl.lastlogTime) if logWaitTime < 0 { tl.lastlogTime = now logF(2, fmt.Sprintf(tl.name+": "+format, v...)) diff --git a/go/vt/mysqlctl/builtinbackupengine.go b/go/vt/mysqlctl/builtinbackupengine.go index 40dfc26c7fc..62a73004f2b 100644 --- a/go/vt/mysqlctl/builtinbackupengine.go +++ b/go/vt/mysqlctl/builtinbackupengine.go @@ -1195,25 +1195,23 @@ func (be *BuiltinBackupEngine) backupManifest( // JSON-encode and write the MANIFEST bm := &builtinBackupManifest{ // Common base fields - BackupManifest: BackupManifest{ - BackupName: bh.Name(), - BackupMethod: builtinBackupEngineName, - Position: backupPosition, - PurgedPosition: purgedPosition, - FromPosition: fromPosition, - FromBackup: fromBackupName, - Incremental: !fromPosition.IsZero(), - ServerUUID: serverUUID, - TabletAlias: params.TabletAlias, - Hostname: hostname, - Keyspace: params.Keyspace, - Shard: params.Shard, - BackupTime: params.BackupTime.UTC().Format(time.RFC3339), - FinishedTime: time.Now().UTC().Format(time.RFC3339), - MySQLVersion: mysqlVersion, - UpgradeSafe: params.UpgradeSafe, - IncrementalDetails: incrDetails, - }, + BackupName: bh.Name(), + BackupMethod: builtinBackupEngineName, + Position: backupPosition, + PurgedPosition: purgedPosition, + FromPosition: fromPosition, + FromBackup: fromBackupName, + Incremental: !fromPosition.IsZero(), + ServerUUID: serverUUID, + TabletAlias: params.TabletAlias, + Hostname: hostname, + Keyspace: params.Keyspace, + Shard: params.Shard, + BackupTime: params.BackupTime.UTC().Format(time.RFC3339), + FinishedTime: time.Now().UTC().Format(time.RFC3339), + MySQLVersion: mysqlVersion, + UpgradeSafe: params.UpgradeSafe, + IncrementalDetails: incrDetails, // Builtin-specific fields FileEntries: fes, diff --git a/go/vt/mysqlctl/mysqlshellbackupengine.go b/go/vt/mysqlctl/mysqlshellbackupengine.go index edcdf30b8e2..3b90514d836 100644 --- a/go/vt/mysqlctl/mysqlshellbackupengine.go +++ b/go/vt/mysqlctl/mysqlshellbackupengine.go @@ -231,23 +231,21 @@ func (be *MySQLShellBackupEngine) ExecuteBackup(ctx context.Context, params Back // JSON-encode and write the MANIFEST bm := &MySQLShellBackupManifest{ // Common base fields - BackupManifest: BackupManifest{ - BackupMethod: mysqlShellBackupEngineName, - // the position is empty here because we have no way of capturing it from mysqlsh - // we will capture it when doing the restore as mysqlsh can replace the GTIDs with - // what it has stored in the backup. - Position: posBeforeBackup, - PurgedPosition: posBeforeBackup, - BackupTime: FormatRFC3339(params.BackupTime.UTC()), - FinishedTime: FormatRFC3339(time.Now().UTC()), - ServerUUID: serverUUID, - TabletAlias: params.TabletAlias, - Hostname: hostname, - Keyspace: params.Keyspace, - Shard: params.Shard, - MySQLVersion: mysqlVersion, - UpgradeSafe: true, - }, + BackupMethod: mysqlShellBackupEngineName, + // the position is empty here because we have no way of capturing it from mysqlsh + // we will capture it when doing the restore as mysqlsh can replace the GTIDs with + // what it has stored in the backup. + Position: posBeforeBackup, + PurgedPosition: posBeforeBackup, + BackupTime: FormatRFC3339(params.BackupTime.UTC()), + FinishedTime: FormatRFC3339(time.Now().UTC()), + ServerUUID: serverUUID, + TabletAlias: params.TabletAlias, + Hostname: hostname, + Keyspace: params.Keyspace, + Shard: params.Shard, + MySQLVersion: mysqlVersion, + UpgradeSafe: true, // mysql shell backup specific fields BackupLocation: location, diff --git a/go/vt/mysqlctl/schema.go b/go/vt/mysqlctl/schema.go index 2da0f6afe9c..ad4f01e2088 100644 --- a/go/vt/mysqlctl/schema.go +++ b/go/vt/mysqlctl/schema.go @@ -678,4 +678,4 @@ func (t tableDefinitions) Swap(i, j int) { t[i], t[j] = t[j], t[i] } -var _ sort.Interface = (tableDefinitions)(nil) +var _ sort.Interface = tableDefinitions(nil) diff --git a/go/vt/mysqlctl/xtrabackupengine.go b/go/vt/mysqlctl/xtrabackupengine.go index de53662bf33..e176b92d1e2 100644 --- a/go/vt/mysqlctl/xtrabackupengine.go +++ b/go/vt/mysqlctl/xtrabackupengine.go @@ -255,23 +255,21 @@ func (be *XtrabackupEngine) executeFullBackup(ctx context.Context, params Backup // JSON-encode and write the MANIFEST bm := &xtraBackupManifest{ // Common base fields - BackupManifest: BackupManifest{ - BackupName: bh.Name(), - BackupMethod: xtrabackupEngineName, - Position: replicationPosition, - PurgedPosition: replicationPosition, - ServerUUID: serverUUID, - TabletAlias: params.TabletAlias, - Hostname: hostname, - Keyspace: params.Keyspace, - Shard: params.Shard, - BackupTime: FormatRFC3339(params.BackupTime.UTC()), - FinishedTime: FormatRFC3339(time.Now().UTC()), - MySQLVersion: mysqlVersion, - // xtrabackup backups are always created such that they - // are safe to use for upgrades later on. - UpgradeSafe: true, - }, + BackupName: bh.Name(), + BackupMethod: xtrabackupEngineName, + Position: replicationPosition, + PurgedPosition: replicationPosition, + ServerUUID: serverUUID, + TabletAlias: params.TabletAlias, + Hostname: hostname, + Keyspace: params.Keyspace, + Shard: params.Shard, + BackupTime: FormatRFC3339(params.BackupTime.UTC()), + FinishedTime: FormatRFC3339(time.Now().UTC()), + MySQLVersion: mysqlVersion, + // xtrabackup backups are always created such that they + // are safe to use for upgrades later on. + UpgradeSafe: true, // XtraBackup-specific fields FileName: backupFileName, diff --git a/go/vt/schema/online_ddl_test.go b/go/vt/schema/online_ddl_test.go index 65bf83ac20c..a81f8e8341e 100644 --- a/go/vt/schema/online_ddl_test.go +++ b/go/vt/schema/online_ddl_test.go @@ -310,11 +310,13 @@ func TestNewOnlineDDLs(t *testing.T) { "drop database t": {notDDL: true}, "truncate table t": {isError: true}, "rename table t to t1": {isError: true}, - "alter table corder add FOREIGN KEY my_fk(customer_id) reference customer(customer_id)": {isError: true, expectErrorText: "syntax error"}, - "alter table corder add FOREIGN KEY my_fk(customer_id) references customer(customer_id)": {isError: true, expectErrorText: "foreign key constraints are not supported"}, - "alter table corder rename as something_else": {isError: true, expectErrorText: "RENAME is not supported in online DDL"}, - "CREATE TABLE if not exists t (id bigint unsigned NOT NULL AUTO_INCREMENT, ts datetime(6) DEFAULT NULL, error_column NO_SUCH_TYPE NOT NULL, PRIMARY KEY (id)) ENGINE=InnoDB": {isError: true, expectErrorText: "near"}, + "alter table corder rename as something_else": {isError: true, expectErrorText: "RENAME is not supported in online DDL"}, } + // These queries are long enough that keeping them in the aligned map literal + // above makes it unreadable. + tests["alter table corder add FOREIGN KEY my_fk(customer_id) reference customer(customer_id)"] = expect{isError: true, expectErrorText: "syntax error"} + tests["alter table corder add FOREIGN KEY my_fk(customer_id) references customer(customer_id)"] = expect{isError: true, expectErrorText: "foreign key constraints are not supported"} + tests["CREATE TABLE if not exists t (id bigint unsigned NOT NULL AUTO_INCREMENT, ts datetime(6) DEFAULT NULL, error_column NO_SUCH_TYPE NOT NULL, PRIMARY KEY (id)) ENGINE=InnoDB"] = expect{isError: true, expectErrorText: "near"} migrationContext := "354b-11eb-82cd-f875a4d24e90" parser := sqlparser.NewTestParser() for query, expect := range tests { diff --git a/go/vt/servenv/grpc_server_auth_static_bench_test.go b/go/vt/servenv/grpc_server_auth_static_bench_test.go index 4f5daeffc74..388ddb1bf8f 100644 --- a/go/vt/servenv/grpc_server_auth_static_bench_test.go +++ b/go/vt/servenv/grpc_server_auth_static_bench_test.go @@ -32,16 +32,12 @@ func newBenchStaticAuthPlugin(numEntries int, hashed bool, password string) *Sta entries := make([]staticAuthEntry, 0, numEntries) for i := 0; i < numEntries-1; i++ { entries = append(entries, staticAuthEntry{ - StaticAuthConfigEntry: StaticAuthConfigEntry{ - Username: fmt.Sprintf("other_user_%d", i), - Password: "other_password", - }, + Username: fmt.Sprintf("other_user_%d", i), + Password: "other_password", }) } target := staticAuthEntry{ - StaticAuthConfigEntry: StaticAuthConfigEntry{ - Username: "bench_user", - }, + Username: "bench_user", } if hashed { stage1 := sha256.Sum256([]byte(password)) diff --git a/go/vt/servenv/metrics.go b/go/vt/servenv/metrics.go deleted file mode 100644 index 52c707f89b3..00000000000 --- a/go/vt/servenv/metrics.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2025 The Vitess Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package servenv - -func getCpuUsage() float64 { - if value, err := getCgroupCpu(); err == nil { - return value - } - if value, err := getHostCpuUsage(); err == nil { - return value - } - return -1 -} - -func getMemoryUsage() float64 { - if value, err := getCgroupMemory(); err == nil { - return value - } - if value, err := getHostMemoryUsage(); err == nil { - return value - } - return -1 -} diff --git a/go/vt/servenv/metrics_linux.go b/go/vt/servenv/metrics_linux.go index 8ee80fb30ca..3db2f769045 100644 --- a/go/vt/servenv/metrics_linux.go +++ b/go/vt/servenv/metrics_linux.go @@ -18,10 +18,22 @@ limitations under the License. package servenv -func getCgroupCpu() (float64, error) { - return getCgroupCpuUsage() +func getCpuUsage() float64 { + if value, err := getCgroupCpuUsage(); err == nil { + return value + } + if value, err := getHostCpuUsage(); err == nil { + return value + } + return -1 } -func getCgroupMemory() (float64, error) { - return getCgroupMemoryUsage() +func getMemoryUsage() float64 { + if value, err := getCgroupMemoryUsage(); err == nil { + return value + } + if value, err := getHostMemoryUsage(); err == nil { + return value + } + return -1 } diff --git a/go/vt/servenv/metrics_nonlinux.go b/go/vt/servenv/metrics_nonlinux.go index 2fda172045c..9d2a382b517 100644 --- a/go/vt/servenv/metrics_nonlinux.go +++ b/go/vt/servenv/metrics_nonlinux.go @@ -18,12 +18,18 @@ limitations under the License. package servenv -import "errors" +// Cgroups are a Linux kernel feature, so only host metrics are available here. -func getCgroupCpu() (float64, error) { - return -1, errors.New("cgroups not supported on nonlinux platforms") +func getCpuUsage() float64 { + if value, err := getHostCpuUsage(); err == nil { + return value + } + return -1 } -func getCgroupMemory() (float64, error) { - return -1, errors.New("cgroups not supported on nonlinux platforms") +func getMemoryUsage() float64 { + if value, err := getHostMemoryUsage(); err == nil { + return value + } + return -1 } diff --git a/go/vt/sidecardb/sidecardb.go b/go/vt/sidecardb/sidecardb.go index 07a832f9608..a647c0682ae 100644 --- a/go/vt/sidecardb/sidecardb.go +++ b/go/vt/sidecardb/sidecardb.go @@ -171,7 +171,7 @@ func loadSchemaDefinitions(parser *sqlparser.Parser) { return vterrors.Errorf(vtrpcpb.Code_INTERNAL, "unexpected path value of %s specified for sidecar schema table; expected structure is [/]/.sql", dir) } - name := strings.Split(fname, ".")[0] + name, _, _ := strings.Cut(fname, ".") schema, err := schemaLocation.ReadFile(path) if err != nil { panic(err) diff --git a/go/vt/throttler/throttler_test.go b/go/vt/throttler/throttler_test.go index 17c12ce7a54..c939d240efe 100644 --- a/go/vt/throttler/throttler_test.go +++ b/go/vt/throttler/throttler_test.go @@ -26,7 +26,6 @@ import ( "github.com/stretchr/testify/require" - "vitess.io/vitess/go/vt/discovery" "vitess.io/vitess/go/vt/proto/query" "vitess.io/vitess/go/vt/proto/topodata" ) @@ -458,18 +457,16 @@ func TestThrottlerMaxLag(t *testing.T) { return } cache.add(replicationLagRecord{ - time: time.Now(), - TabletHealth: discovery.TabletHealth{ - Serving: true, - Stats: &query.RealtimeStats{ - ReplicationLagSeconds: 5, - }, - Tablet: &topodata.Tablet{ - Hostname: t.Name(), - Type: tabletType, - PortMap: map[string]int32{ - "test": 15999, - }, + time: time.Now(), + Serving: true, + Stats: &query.RealtimeStats{ + ReplicationLagSeconds: 5, + }, + Tablet: &topodata.Tablet{ + Hostname: t.Name(), + Type: tabletType, + PortMap: map[string]int32{ + "test": 15999, }, }, }) diff --git a/go/vt/tlstest/tlstest.go b/go/vt/tlstest/tlstest.go index 428373dbb3c..15d1e7fa706 100644 --- a/go/vt/tlstest/tlstest.go +++ b/go/vt/tlstest/tlstest.go @@ -313,8 +313,7 @@ func CreateCRL(root, parent string) { } crlList, err := x509.CreateRevocationList(rand.Reader, &x509.RevocationList{ - RevokedCertificates: nil, - Number: big.NewInt(1), + Number: big.NewInt(1), }, caCert, caKey.(crypto.Signer)) if err != nil { log.Error(fmt.Sprint(err)) diff --git a/go/vt/topo/consultopo/error.go b/go/vt/topo/consultopo/error.go index 0567049026d..7489ebd9014 100644 --- a/go/vt/topo/consultopo/error.go +++ b/go/vt/topo/consultopo/error.go @@ -39,8 +39,7 @@ var ( // are either application-level errors, or context errors. func convertError(err error, nodePath string) error { // Unwrap errors from the Go HTTP client. - var urlErr *url.Error - if errors.As(err, &urlErr) { + if urlErr, ok := errors.AsType[*url.Error](err); ok { err = urlErr.Err } diff --git a/go/vt/topo/errors.go b/go/vt/topo/errors.go index 6365740b667..bce73b811c1 100644 --- a/go/vt/topo/errors.go +++ b/go/vt/topo/errors.go @@ -86,9 +86,7 @@ func (e Error) Error() string { // IsErrType returns true if the error has the specified ErrorCode. func IsErrType(err error, code ErrorCode) bool { - var e Error - - if errors.As(err, &e) { + if e, ok := errors.AsType[Error](err); ok { return e.code == code } diff --git a/go/vt/topo/etcd2topo/error.go b/go/vt/topo/etcd2topo/error.go index 6281e587af2..c6d08ffb5b0 100644 --- a/go/vt/topo/etcd2topo/error.go +++ b/go/vt/topo/etcd2topo/error.go @@ -44,8 +44,7 @@ func convertError(err error, nodePath string) error { return nil } - var typeErr rpctypes.EtcdError - if errors.As(err, &typeErr) { + if typeErr, ok := errors.AsType[rpctypes.EtcdError](err); ok { switch typeErr.Code() { case codes.NotFound: return topo.NewError(topo.NoNode, nodePath) diff --git a/go/vt/topo/etcd2topo/watch.go b/go/vt/topo/etcd2topo/watch.go index 3eb5764f9e7..691c8417e23 100644 --- a/go/vt/topo/etcd2topo/watch.go +++ b/go/vt/topo/etcd2topo/watch.go @@ -219,7 +219,7 @@ func (s *Server) WatchRecursive(ctx context.Context, dirpath string) ([]*topo.Wa case <-watchCtx.Done(): // This includes context cancellation errors. notifications <- &topo.WatchDataRecursive{ - WatchData: topo.WatchData{Err: convertError(watchCtx.Err(), nodePath)}, + Err: convertError(watchCtx.Err(), nodePath), } return case wresp, ok := <-watcher: @@ -252,7 +252,7 @@ func (s *Server) WatchRecursive(ctx context.Context, dirpath string) ([]*topo.Wa if wresp.Canceled { // Final notification. notifications <- &topo.WatchDataRecursive{ - WatchData: topo.WatchData{Err: convertError(wresp.Err(), nodePath)}, + Err: convertError(wresp.Err(), nodePath), } return } @@ -263,18 +263,14 @@ func (s *Server) WatchRecursive(ctx context.Context, dirpath string) ([]*topo.Wa switch ev.Type { case mvccpb.PUT: notifications <- &topo.WatchDataRecursive{ - Path: string(ev.Kv.Key), - WatchData: topo.WatchData{ - Contents: ev.Kv.Value, - Version: EtcdVersion(ev.Kv.ModRevision), - }, + Path: string(ev.Kv.Key), + Contents: ev.Kv.Value, + Version: EtcdVersion(ev.Kv.ModRevision), } case mvccpb.DELETE: notifications <- &topo.WatchDataRecursive{ Path: string(ev.Kv.Key), - WatchData: topo.WatchData{ - Err: topo.NewError(topo.NoNode, nodePath), - }, + Err: topo.NewError(topo.NoNode, nodePath), } } } diff --git a/go/vt/topo/memorytopo/file.go b/go/vt/topo/memorytopo/file.go index 9007d852d5c..76b55eaf2ad 100644 --- a/go/vt/topo/memorytopo/file.go +++ b/go/vt/topo/memorytopo/file.go @@ -67,11 +67,9 @@ func (c *Conn) Create(ctx context.Context, filePath string, contents []byte) (to p.children[file] = n n.propagateRecursiveWatch(&topo.WatchDataRecursive{ - Path: filePath, - WatchData: topo.WatchData{ - Contents: n.contents, - Version: NodeVersion(n.version), - }, + Path: filePath, + Contents: n.contents, + Version: NodeVersion(n.version), }) return NodeVersion(n.version), nil @@ -150,11 +148,9 @@ func (c *Conn) Update(ctx context.Context, filePath string, contents []byte, ver } n.propagateRecursiveWatch(&topo.WatchDataRecursive{ - Path: filePath, - WatchData: topo.WatchData{ - Contents: n.contents, - Version: NodeVersion(n.version), - }, + Path: filePath, + Contents: n.contents, + Version: NodeVersion(n.version), }) return NodeVersion(n.version), nil @@ -316,9 +312,7 @@ func (c *Conn) Delete(ctx context.Context, filePath string, version topo.Version n.propagateRecursiveWatch(&topo.WatchDataRecursive{ Path: filePath, - WatchData: topo.WatchData{ - Err: topo.NewError(topo.NoNode, filePath), - }, + Err: topo.NewError(topo.NoNode, filePath), }) return nil diff --git a/go/vt/topo/memorytopo/watch.go b/go/vt/topo/memorytopo/watch.go index dcb90a8f0ef..a5f22115d97 100644 --- a/go/vt/topo/memorytopo/watch.go +++ b/go/vt/topo/memorytopo/watch.go @@ -104,11 +104,9 @@ func (c *Conn) WatchRecursive(ctx context.Context, dirpath string) ([]*topo.Watc var initialwd []*topo.WatchDataRecursive n.recurseContents(func(n *node) { initialwd = append(initialwd, &topo.WatchDataRecursive{ - Path: n.name, - WatchData: topo.WatchData{ - Contents: n.contents, - Version: NodeVersion(n.version), - }, + Path: n.name, + Contents: n.contents, + Version: NodeVersion(n.version), }) }) @@ -129,7 +127,7 @@ func (c *Conn) WatchRecursive(ctx context.Context, dirpath string) ([]*topo.Watc delete(n.watches, watchIndex) } - notifications <- &topo.WatchDataRecursive{WatchData: topo.WatchData{Err: topo.NewError(topo.Interrupted, "watch")}} + notifications <- &topo.WatchDataRecursive{Err: topo.NewError(topo.Interrupted, "watch")} }() return initialwd, notifications, nil diff --git a/go/vt/topo/zk2topo/version.go b/go/vt/topo/zk2topo/version.go index ba3a750775e..087fa21a35c 100644 --- a/go/vt/topo/zk2topo/version.go +++ b/go/vt/topo/zk2topo/version.go @@ -32,4 +32,4 @@ func (v ZKVersion) String() string { return strconv.Itoa(int(int32(v))) } -var _ topo.Version = (ZKVersion)(0) // compile-time interface check +var _ topo.Version = ZKVersion(0) // compile-time interface check diff --git a/go/vt/topo/zk2topo/zk_conn.go b/go/vt/topo/zk2topo/zk_conn.go index bfec85f157f..8da1b4dc60a 100644 --- a/go/vt/topo/zk2topo/zk_conn.go +++ b/go/vt/topo/zk2topo/zk_conn.go @@ -370,7 +370,7 @@ func dialZk(ctx context.Context, addr string) (*zk.Conn, <-chan zk.Event, error) os.Exit(1) } - serverName := strings.Split(addr, ":")[0] + serverName, _, _ := strings.Cut(addr, ":") log.Info(fmt.Sprintf("Using TLS ZK, connecting to %v server name %v", addr, serverName)) cert, err := tls.LoadX509KeyPair(certPath, keyPath) diff --git a/go/vt/topotools/events/reparent_syslog_test.go b/go/vt/topotools/events/reparent_syslog_test.go index fbec27a5e1b..cb5d52819dd 100644 --- a/go/vt/topotools/events/reparent_syslog_test.go +++ b/go/vt/topotools/events/reparent_syslog_test.go @@ -24,7 +24,6 @@ import ( "github.com/stretchr/testify/assert" - base "vitess.io/vitess/go/vt/events" "vitess.io/vitess/go/vt/topo" topodatapb "vitess.io/vitess/go/vt/proto/topodata" @@ -46,8 +45,8 @@ func TestReparentSyslog(t *testing.T) { Uid: 54321, }, }, - ExternalID: "123-456-789", - StatusUpdater: base.StatusUpdater{Status: "status"}, + ExternalID: "123-456-789", + Status: "status", } gotSev, gotMsg := tc.Syslog() diff --git a/go/vt/vitessdriver/driver_test.go b/go/vt/vitessdriver/driver_test.go index b6c2d78d37d..e0b4bd8c9e1 100644 --- a/go/vt/vitessdriver/driver_test.go +++ b/go/vt/vitessdriver/driver_test.go @@ -135,7 +135,7 @@ func TestOpen(t *testing.T) { defer c.Close() wantc := tc.conn - newc := *(c.(*conn)) + newc := *c.(*conn) newc.cfg.Address = "" newc.conn = nil newc.session = nil diff --git a/go/vt/vtadmin/cluster/discovery/discovery_dynamic.go b/go/vt/vtadmin/cluster/discovery/discovery_dynamic.go index 27438ead050..2474b4e6e15 100644 --- a/go/vt/vtadmin/cluster/discovery/discovery_dynamic.go +++ b/go/vt/vtadmin/cluster/discovery/discovery_dynamic.go @@ -51,9 +51,7 @@ type DynamicDiscovery struct { // NewDynamic returns a DynamicDiscovery for the given cluster. func NewDynamic(cluster *vtadminpb.Cluster, flags *pflag.FlagSet, args []string) (Discovery, error) { disco := &DynamicDiscovery{ - JSONDiscovery: JSONDiscovery{ - cluster: cluster, - }, + cluster: cluster, } json := flags.String("discovery", "", "the json config object") diff --git a/go/vt/vtadmin/cluster/discovery/discovery_static_file.go b/go/vt/vtadmin/cluster/discovery/discovery_static_file.go index 62355f74a5e..8d05300cf3c 100644 --- a/go/vt/vtadmin/cluster/discovery/discovery_static_file.go +++ b/go/vt/vtadmin/cluster/discovery/discovery_static_file.go @@ -49,9 +49,7 @@ type StaticFileDiscovery struct { // NewStaticFile returns a StaticFileDiscovery for the given cluster. func NewStaticFile(cluster *vtadminpb.Cluster, flags *pflag.FlagSet, args []string) (Discovery, error) { disco := &StaticFileDiscovery{ - JSONDiscovery: JSONDiscovery{ - cluster: cluster, - }, + cluster: cluster, } filePath := flags.String("path", "", "path to the service discovery JSON config file") diff --git a/go/vt/vtctl/reparentutil/replication.go b/go/vt/vtctl/reparentutil/replication.go index c27c63c2a73..eff68bb79e5 100644 --- a/go/vt/vtctl/reparentutil/replication.go +++ b/go/vt/vtctl/reparentutil/replication.go @@ -589,8 +589,7 @@ func stopReplicationAndBuildStatusMaps( // we don't need to handle them differently — the goal is simply to confirm the // error came from the PRIMARY tablet, not to diagnose why it failed. if primaryAlias != nil && len(errRecorder.Errors) == 1 { - var tabletErr *tabletAliasError - if errors.As(errRecorder.Errors[0], &tabletErr) { + if tabletErr, ok := errors.AsType[*tabletAliasError](errRecorder.Errors[0]); ok { // Failure to reach the PRIMARY tablet is expected, return early. if topoproto.TabletAliasEqual(primaryAlias, tabletErr.GetAlias()) { return res, nil diff --git a/go/vt/vtctl/vtctl.go b/go/vt/vtctl/vtctl.go index ef7dd843680..0bf6564c52f 100644 --- a/go/vt/vtctl/vtctl.go +++ b/go/vt/vtctl/vtctl.go @@ -4054,12 +4054,12 @@ func RunCommand(ctx context.Context, wr *wrangler.Wrangler, args []string) error } func PrintDoubleDashDeprecationNotice(wr *wrangler.Wrangler) { - msg := (`DEPRECATION NOTICE: in v14, users needed to add a double-dash ("--") separator to split up top-level and sub-command arguments/flags. + msg := `DEPRECATION NOTICE: in v14, users needed to add a double-dash ("--") separator to split up top-level and sub-command arguments/flags. Beginning in v16, this will no longer work properly. Please remove any double-dashes that preceed sub-command **flags** only. Note that this does not mean you do not need a separator to split up position arguments. For example, to pass a flag to a hook via ExecuteHook, "vtctl ExecuteHook myhook.sh -- --hook-flag 5" is the correct formation. -For v1 Reshard commands, you will also need a separator if your shard names begin with a hyphen, i.e. "Reshard ks.workflow -- -80,80-" needs a double-dash, but "Reshard ks.workflow 40-80,80-c0" does not.`) +For v1 Reshard commands, you will also need a separator if your shard names begin with a hyphen, i.e. "Reshard ks.workflow -- -80,80-" needs a double-dash, but "Reshard ks.workflow 40-80,80-c0" does not.` wr.Logger().Warningf(msg) } diff --git a/go/vt/vtctl/workflow/stream_migrator_test.go b/go/vt/vtctl/workflow/stream_migrator_test.go index 2d4620e4835..0fa24b6b3d6 100644 --- a/go/vt/vtctl/workflow/stream_migrator_test.go +++ b/go/vt/vtctl/workflow/stream_migrator_test.go @@ -452,18 +452,16 @@ func newStreamMigratorEnv(ctx context.Context, t *testing.T, sourceKeyspace, tar env.targetTabletIds = append(env.targetTabletIds, int(tablet.Alias.Uid)) } ts := &testTrafficSwitcher{ - trafficSwitcher: trafficSwitcher{ - migrationType: binlogdatapb.MigrationType_SHARDS, - workflow: "wf1", - id: 1, - sources: sources, - targets: targets, - sourceKeyspace: sourceKeyspace.KeyspaceName, - targetKeyspace: targetKeyspace.KeyspaceName, - sourceKSSchema: ksschema, - workflowType: binlogdatapb.VReplicationWorkflowType_Reshard, - ws: tenv.ws, - }, + migrationType: binlogdatapb.MigrationType_SHARDS, + workflow: "wf1", + id: 1, + sources: sources, + targets: targets, + sourceKeyspace: sourceKeyspace.KeyspaceName, + targetKeyspace: targetKeyspace.KeyspaceName, + sourceKSSchema: ksschema, + workflowType: binlogdatapb.VReplicationWorkflowType_Reshard, + ws: tenv.ws, sourceKeyspaceSchema: ksschema, } env.ts = ts diff --git a/go/vt/vtctl/workflow/traffic_switcher.go b/go/vt/vtctl/workflow/traffic_switcher.go index d5c220ac086..6ec3059eac2 100644 --- a/go/vt/vtctl/workflow/traffic_switcher.go +++ b/go/vt/vtctl/workflow/traffic_switcher.go @@ -263,11 +263,17 @@ func (ts *trafficSwitcher) Logger() logutil.Logger { func (ts *trafficSwitcher) VReplicationExec(ctx context.Context, alias *topodatapb.TabletAlias, query string) (*querypb.QueryResult, error) { return ts.ws.VReplicationExec(ctx, alias, query) } -func (ts *trafficSwitcher) ExternalTopo() *topo.Server { return ts.externalTopo } -func (ts *trafficSwitcher) MigrationType() binlogdatapb.MigrationType { return ts.migrationType } -func (ts *trafficSwitcher) IsPartialMigration() bool { return ts.isPartialMigration } -func (ts *trafficSwitcher) ReverseWorkflowName() string { return ts.reverseWorkflow } -func (ts *trafficSwitcher) SourceKeyspaceName() string { return ts.sourceKeyspace } + +func (ts *trafficSwitcher) ExternalTopo() *topo.Server { return ts.externalTopo } + +func (ts *trafficSwitcher) MigrationType() binlogdatapb.MigrationType { return ts.migrationType } + +func (ts *trafficSwitcher) IsPartialMigration() bool { return ts.isPartialMigration } + +func (ts *trafficSwitcher) ReverseWorkflowName() string { return ts.reverseWorkflow } + +func (ts *trafficSwitcher) SourceKeyspaceName() string { return ts.sourceKeyspace } + func (ts *trafficSwitcher) SourceKeyspaceSchema() *vindexes.KeyspaceSchema { return ts.sourceKSSchema } func (ts *trafficSwitcher) Sources() map[string]*MigrationSource { return ts.sources } func (ts *trafficSwitcher) Tables() []string { return ts.tables } @@ -275,7 +281,8 @@ func (ts *trafficSwitcher) TargetKeyspaceName() string { ret func (ts *trafficSwitcher) Targets() map[string]*MigrationTarget { return ts.targets } func (ts *trafficSwitcher) WorkflowName() string { return ts.workflow } func (ts *trafficSwitcher) SourceTimeZone() string { return ts.sourceTimeZone } -func (ts *trafficSwitcher) TargetTimeZone() string { return ts.targetTimeZone } + +func (ts *trafficSwitcher) TargetTimeZone() string { return ts.targetTimeZone } func (ts *trafficSwitcher) ForAllSources(f func(source *MigrationSource) error) error { var wg sync.WaitGroup diff --git a/go/vt/vterrors/errors_test.go b/go/vt/vterrors/errors_test.go index 39f62830eb8..0e6bed7ffe8 100644 --- a/go/vt/vterrors/errors_test.go +++ b/go/vt/vterrors/errors_test.go @@ -129,7 +129,7 @@ func TestRootCause(t *testing.T) { want: nil, }, { // explicit nil error is nil - err: (error)(nil), + err: error(nil), want: nil, }, { // typed nil is nil diff --git a/go/vt/vterrors/vterrors.go b/go/vt/vterrors/vterrors.go index 6a186e20075..20eb73d5dbf 100644 --- a/go/vt/vterrors/vterrors.go +++ b/go/vt/vterrors/vterrors.go @@ -265,8 +265,7 @@ func Wrapf(err error, format string, args ...any) error { // The function indicates whether the error was indeed wrapped. If the error was not wrapped, the function // returns the original error. func Unwrap(err error) (wasWrapped bool, unwrapped error) { - var w *wrapping - if errors.As(err, &w) { + if w, ok := errors.AsType[*wrapping](err); ok { return true, w.Cause() } return false, err diff --git a/go/vt/vtgate/engine/insert.go b/go/vt/vtgate/engine/insert.go index de3cc67c650..ca4077417f2 100644 --- a/go/vt/vtgate/engine/insert.go +++ b/go/vt/vtgate/engine/insert.go @@ -62,11 +62,9 @@ type Insert struct { // newQueryInsert creates an Insert with a query string. Used in testing. func newQueryInsert(opcode InsertOpcode, keyspace *vindexes.Keyspace, query string) *Insert { return &Insert{ - InsertCommon: InsertCommon{ - Opcode: opcode, - Keyspace: keyspace, - }, - Query: query, + Opcode: opcode, + Keyspace: keyspace, + Query: query, } } @@ -82,13 +80,11 @@ func newInsert( suffix sqlparser.OnDup, ) *Insert { ins := &Insert{ - InsertCommon: InsertCommon{ - Opcode: opcode, - Keyspace: keyspace, - Ignore: ignore, - Prefix: prefix, - Suffix: suffix, - }, + Opcode: opcode, + Keyspace: keyspace, + Ignore: ignore, + Prefix: prefix, + Suffix: suffix, VindexValues: vindexValues, Mid: mid, } diff --git a/go/vt/vtgate/engine/insert_select.go b/go/vt/vtgate/engine/insert_select.go index 30eccb26820..ce30e8cb097 100644 --- a/go/vt/vtgate/engine/insert_select.go +++ b/go/vt/vtgate/engine/insert_select.go @@ -61,12 +61,10 @@ func newInsertSelect( input Primitive, ) *InsertSelect { ins := &InsertSelect{ - InsertCommon: InsertCommon{ - Ignore: ignore, - Keyspace: keyspace, - Prefix: prefix, - Suffix: suffix, - }, + Ignore: ignore, + Keyspace: keyspace, + Prefix: prefix, + Suffix: suffix, Input: input, VindexValueOffset: vv, } diff --git a/go/vt/vtgate/evalengine/api_hash_test.go b/go/vt/vtgate/evalengine/api_hash_test.go index 0f22fbdc854..f366e1bfa1a 100644 --- a/go/vt/vtgate/evalengine/api_hash_test.go +++ b/go/vt/vtgate/evalengine/api_hash_test.go @@ -216,7 +216,7 @@ func coerceTo(v1, v2 sqltypes.Type) (sqltypes.Type, error) { if sqltypes.IsNull(v1) || sqltypes.IsNull(v2) { return sqltypes.Null, nil } - if (sqltypes.IsTextOrBinary(v1)) && (sqltypes.IsTextOrBinary(v2)) { + if sqltypes.IsTextOrBinary(v1) && sqltypes.IsTextOrBinary(v2) { return sqltypes.VarChar, nil } if sqltypes.IsDateOrTime(v1) { diff --git a/go/vt/vtgate/evalengine/expr_env_test.go b/go/vt/vtgate/evalengine/expr_env_test.go index c51d6578e98..5bebb0e2cfc 100644 --- a/go/vt/vtgate/evalengine/expr_env_test.go +++ b/go/vt/vtgate/evalengine/expr_env_test.go @@ -81,11 +81,9 @@ func TestExpressionEnvTypeOf(t *testing.T) { typed: nil, needTypes: []typedIR{sumCol, countCol}, ir: &ArithmeticExpr{ - Op: &opArithDiv{}, - BinaryExpr: BinaryExpr{ - Left: sumCol, - Right: countCol, - }, + Op: &opArithDiv{}, + Left: sumCol, + Right: countCol, }, }, wantedScale: 6, diff --git a/go/vt/vtgate/evalengine/expr_tuple.go b/go/vt/vtgate/evalengine/expr_tuple.go index 5a72f02c939..e53d00330c6 100644 --- a/go/vt/vtgate/evalengine/expr_tuple.go +++ b/go/vt/vtgate/evalengine/expr_tuple.go @@ -26,8 +26,8 @@ type ( ) var ( - _ IR = (TupleExpr)(nil) - _ Expr = (TupleExpr)(nil) + _ IR = TupleExpr(nil) + _ Expr = TupleExpr(nil) ) func (tuple TupleExpr) IR() IR { diff --git a/go/vt/vtgate/evalengine/fn_regexp.go b/go/vt/vtgate/evalengine/fn_regexp.go index 1280c46d672..e630e4c52c0 100644 --- a/go/vt/vtgate/evalengine/fn_regexp.go +++ b/go/vt/vtgate/evalengine/fn_regexp.go @@ -165,12 +165,11 @@ func compileRegex(pat eval, c colldata.Charset, flags icuregex.RegexpFlag) (*icu return regexp, nil } - var compileErr *icuregex.CompileError if errors.Is(err, icuerrors.ErrUnsupported) { err = vterrors.NewError(vtrpcpb.Code_UNIMPLEMENTED, vterrors.RegexpUnimplemented, err.Error()) } else if errors.Is(err, icuerrors.ErrIllegalArgument) { err = vterrors.NewError(vtrpcpb.Code_INVALID_ARGUMENT, vterrors.RegexpIllegalArgument, err.Error()) - } else if errors.As(err, &compileErr) { + } else if compileErr, ok := errors.AsType[*icuregex.CompileError](err); ok { switch compileErr.Code { case icuregex.InternalError: err = vterrors.NewError(vtrpcpb.Code_INVALID_ARGUMENT, vterrors.RegexpInternal, compileErr.Error()) diff --git a/go/vt/vtgate/evalengine/translate.go b/go/vt/vtgate/evalengine/translate.go index 97c8c69308d..a0743f8e91a 100644 --- a/go/vt/vtgate/evalengine/translate.go +++ b/go/vt/vtgate/evalengine/translate.go @@ -82,11 +82,9 @@ func (ast *astCompiler) translateComparisonExpr2(op sqlparser.ComparisonExprOper return &LikeExpr{BinaryExpr: binaryExpr, Negate: true}, nil case sqlparser.RegexpOp, sqlparser.NotRegexpOp: return &builtinRegexpLike{ - CallExpr: CallExpr{ - Arguments: []IR{left, right}, - Method: "REGEXP_LIKE", - }, - Negate: op == sqlparser.NotRegexpOp, + Arguments: []IR{left, right}, + Method: "REGEXP_LIKE", + Negate: op == sqlparser.NotRegexpOp, }, nil default: return nil, vterrors.New(vtrpcpb.Code_UNIMPLEMENTED, op.ToString()) @@ -133,11 +131,9 @@ func (ast *astCompiler) translateLogicalExpr(node sqlparser.Expr) (IR, error) { } return &LogicalExpr{ - BinaryExpr: BinaryExpr{ - Left: l, - Right: r, - }, - op: logic, + Left: l, + Right: r, + op: logic, }, nil } diff --git a/go/vt/vtgate/evalengine/translate_builtin.go b/go/vt/vtgate/evalengine/translate_builtin.go index d0e79c91b1e..9222c5fa41f 100644 --- a/go/vt/vtgate/evalengine/translate_builtin.go +++ b/go/vt/vtgate/evalengine/translate_builtin.go @@ -204,11 +204,9 @@ func (ast *astCompiler) translateFuncExpr(fn *sqlparser.FuncExpr) (IR, error) { return nil, argError(method) } return &ArithmeticExpr{ - BinaryExpr: BinaryExpr{ - Left: args[0], - Right: args[1], - }, - Op: &opArithMod{}, + Left: args[0], + Right: args[1], + Op: &opArithMod{}, }, nil case "log2": if len(args) != 1 { @@ -706,10 +704,8 @@ func (ast *astCompiler) translateCallable(call sqlparser.Callable) (IR, error) { return nil, err } return &builtinJSONExtract{ - CallExpr: CallExpr{ - Arguments: args, - Method: "JSON_EXTRACT", - }, + Arguments: args, + Method: "JSON_EXTRACT", }, nil case *sqlparser.JSONRemoveExpr: @@ -718,10 +714,8 @@ func (ast *astCompiler) translateCallable(call sqlparser.Callable) (IR, error) { return nil, err } return &builtinJSONRemove{ - CallExpr: CallExpr{ - Arguments: args, - Method: "JSON_REMOVE", - }, + Arguments: args, + Method: "JSON_REMOVE", }, nil case *sqlparser.JSONUnquoteExpr: @@ -730,10 +724,8 @@ func (ast *astCompiler) translateCallable(call sqlparser.Callable) (IR, error) { return nil, err } return &builtinJSONUnquote{ - CallExpr: CallExpr{ - Arguments: []IR{arg}, - Method: "JSON_UNQUOTE", - }, + Arguments: []IR{arg}, + Method: "JSON_UNQUOTE", }, nil case *sqlparser.JSONObjectExpr: @@ -750,10 +742,8 @@ func (ast *astCompiler) translateCallable(call sqlparser.Callable) (IR, error) { args = append(args, key, val) } return &builtinJSONObject{ - CallExpr: CallExpr{ - Arguments: args, - Method: "JSON_OBJECT", - }, + Arguments: args, + Method: "JSON_OBJECT", }, nil case *sqlparser.JSONArrayExpr: @@ -761,10 +751,10 @@ func (ast *astCompiler) translateCallable(call sqlparser.Callable) (IR, error) { if err != nil { return nil, err } - return &builtinJSONArray{CallExpr: CallExpr{ + return &builtinJSONArray{ Arguments: args, Method: "JSON_ARRAY", - }}, nil + }, nil case *sqlparser.JSONContainsPathExpr: exprs := make([]sqlparser.Expr, 0, 2+len(call.PathList)) @@ -774,10 +764,10 @@ func (ast *astCompiler) translateCallable(call sqlparser.Callable) (IR, error) { if err != nil { return nil, err } - return &builtinJSONContainsPath{CallExpr: CallExpr{ + return &builtinJSONContainsPath{ Arguments: args, Method: "JSON_CONTAINS_PATH", - }}, nil + }, nil case *sqlparser.JSONKeysExpr: var args []IR @@ -795,10 +785,10 @@ func (ast *astCompiler) translateCallable(call sqlparser.Callable) (IR, error) { args = append(args, path) } - return &builtinJSONKeys{CallExpr: CallExpr{ + return &builtinJSONKeys{ Arguments: args, Method: "JSON_KEYS", - }}, nil + }, nil case *sqlparser.CurTimeFuncExpr: if call.Fsp > 6 { @@ -943,8 +933,8 @@ func (ast *astCompiler) translateCallable(call sqlparser.Callable) (IR, error) { } return &builtinRegexpLike{ - CallExpr: CallExpr{Arguments: args, Method: "REGEXP_LIKE"}, - Negate: false, + Arguments: args, Method: "REGEXP_LIKE", + Negate: false, }, nil case *sqlparser.RegexpInstrExpr: @@ -993,7 +983,7 @@ func (ast *astCompiler) translateCallable(call sqlparser.Callable) (IR, error) { } return &builtinRegexpInstr{ - CallExpr: CallExpr{Arguments: args, Method: "REGEXP_INSTR"}, + Arguments: args, Method: "REGEXP_INSTR", }, nil case *sqlparser.RegexpSubstrExpr: @@ -1034,7 +1024,7 @@ func (ast *astCompiler) translateCallable(call sqlparser.Callable) (IR, error) { } return &builtinRegexpSubstr{ - CallExpr: CallExpr{Arguments: args, Method: "REGEXP_SUBSTR"}, + Arguments: args, Method: "REGEXP_SUBSTR", }, nil case *sqlparser.RegexpReplaceExpr: @@ -1080,7 +1070,7 @@ func (ast *astCompiler) translateCallable(call sqlparser.Callable) (IR, error) { } return &builtinRegexpReplace{ - CallExpr: CallExpr{Arguments: args, Method: "REGEXP_REPLACE"}, + Arguments: args, Method: "REGEXP_REPLACE", }, nil case *sqlparser.InsertExpr: @@ -1148,10 +1138,8 @@ func builtinJSONExtractUnquoteRewrite(left IR, right IR) (IR, error) { return nil, err } return &builtinJSONUnquote{ - CallExpr: CallExpr{ - Arguments: []IR{extract}, - Method: "JSON_UNQUOTE", - }, + Arguments: []IR{extract}, + Method: "JSON_UNQUOTE", }, nil } @@ -1160,10 +1148,8 @@ func builtinJSONExtractRewrite(left IR, right IR) (IR, error) { return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "lhs of a JSON extract operator must be a column") } return &builtinJSONExtract{ - CallExpr: CallExpr{ - Arguments: []IR{left, right}, - Method: "JSON_EXTRACT", - }, + Arguments: []IR{left, right}, + Method: "JSON_EXTRACT", }, nil } @@ -1204,11 +1190,9 @@ func builtinNullIfRewrite(args []IR) (IR, error) { return &CaseExpr{ cases: []WhenThen{{ when: &ComparisonExpr{ - BinaryExpr: BinaryExpr{ - Left: args[0], - Right: args[1], - }, - Op: compareEQ{}, + Left: args[0], + Right: args[1], + Op: compareEQ{}, }, then: NullExpr, }}, diff --git a/go/vt/vtgate/planbuilder/ddl.go b/go/vt/vtgate/planbuilder/ddl.go index f39f8ff90bf..e45c4f15df9 100644 --- a/go/vt/vtgate/planbuilder/ddl.go +++ b/go/vt/vtgate/planbuilder/ddl.go @@ -160,16 +160,18 @@ func buildDDLPlans(ctx context.Context, sql string, ddlStatement sqlparser.DDLSt query = sqlparser.String(ddlStatement) } - return &engine.Send{ - Keyspace: keyspace, - TargetDestination: destination, - Query: query, - }, &engine.OnlineDDL{ - Keyspace: keyspace, - TargetDestination: destination, - DDL: ddlStatement, - SQL: query, - }, nil + send := &engine.Send{ + Keyspace: keyspace, + TargetDestination: destination, + Query: query, + } + onlineDDL := &engine.OnlineDDL{ + Keyspace: keyspace, + TargetDestination: destination, + DDL: ddlStatement, + SQL: query, + } + return send, onlineDDL, nil } func buildDropProcedurePlan(vschema plancontext.VSchema, dp *sqlparser.DropProcedure) (key.ShardDestination, *vindexes.Keyspace, error) { diff --git a/go/vt/vtgate/planbuilder/insert.go b/go/vt/vtgate/planbuilder/insert.go index d784fffe7ee..3ff2a8e202f 100644 --- a/go/vt/vtgate/planbuilder/insert.go +++ b/go/vt/vtgate/planbuilder/insert.go @@ -92,12 +92,10 @@ func errOutIfPlanCannotBeConstructed(ctx *plancontext.PlanningContext, vTbl *vin func insertUnshardedShortcut(ctx *plancontext.PlanningContext, stmt *sqlparser.Insert, ks *vindexes.Keyspace, tables []*vindexes.BaseTable) engine.Primitive { eIns := &engine.Insert{ - InsertCommon: engine.InsertCommon{ - Opcode: engine.InsertUnsharded, - Keyspace: ks, - TableName: tables[0].Name.String(), - FetchLastInsertID: ctx.SemTable.ShouldFetchLastInsertID(), - }, + Opcode: engine.InsertUnsharded, + Keyspace: ks, + TableName: tables[0].Name.String(), + FetchLastInsertID: ctx.SemTable.ShouldFetchLastInsertID(), } eIns.Query = generateQuery(stmt) return eIns diff --git a/go/vt/vtgate/planbuilder/operator_transformers.go b/go/vt/vtgate/planbuilder/operator_transformers.go index 0366c984d6a..2bfb01e4fa4 100644 --- a/go/vt/vtgate/planbuilder/operator_transformers.go +++ b/go/vt/vtgate/planbuilder/operator_transformers.go @@ -199,15 +199,13 @@ func transformInsertionSelection(ctx *plancontext.PlanningContext, op *operators ins := dmlOp.(*operators.Insert) eins := &engine.InsertSelect{ - InsertCommon: engine.InsertCommon{ - Keyspace: rb.Routing.Keyspace(), - TableName: ins.VTable.Name.String(), - Ignore: ins.Ignore, - ForceNonStreaming: op.ForceNonStreaming, - Generate: autoIncGenerate(ins.AutoIncrement), - ColVindexes: ins.ColVindexes, - FetchLastInsertID: ctx.SemTable.ShouldFetchLastInsertID(), - }, + Keyspace: rb.Routing.Keyspace(), + TableName: ins.VTable.Name.String(), + Ignore: ins.Ignore, + ForceNonStreaming: op.ForceNonStreaming, + Generate: autoIncGenerate(ins.AutoIncrement), + ColVindexes: ins.ColVindexes, + FetchLastInsertID: ctx.SemTable.ShouldFetchLastInsertID(), VindexValueOffset: ins.VindexValueOffset, } diff --git a/go/vt/vtgate/planbuilder/operators/route_planning.go b/go/vt/vtgate/planbuilder/operators/route_planning.go index ca3a65ed153..eab0797aca3 100644 --- a/go/vt/vtgate/planbuilder/operators/route_planning.go +++ b/go/vt/vtgate/planbuilder/operators/route_planning.go @@ -673,7 +673,7 @@ func gen4ValEqual(ctx *plancontext.PlanningContext, a, b sqlparser.Expr) (bool, case sqlparser.HexVal: return hexEqual(a, b), nil case sqlparser.IntVal: - if b.Type == (sqlparser.IntVal) { + if b.Type == sqlparser.IntVal { return a.Val == b.Val, nil } } diff --git a/go/vt/vtgate/planbuilder/operators/route_planning_test.go b/go/vt/vtgate/planbuilder/operators/route_planning_test.go index 71255750c2f..30f7fc21b65 100644 --- a/go/vt/vtgate/planbuilder/operators/route_planning_test.go +++ b/go/vt/vtgate/planbuilder/operators/route_planning_test.go @@ -172,7 +172,7 @@ func TestCheckCrossKeyspaceJoin(t *testing.T) { }, { name: "composite same-keyspace lhs, cross-keyspace denied", - lhs: &Join{binaryOperator: binaryOperator{LHS: makeRoute(ks1), RHS: makeRoute(ks1)}}, + lhs: &Join{LHS: makeRoute(ks1), RHS: makeRoute(ks1)}, rhs: makeRoute(ks2), vschema: &mockVSchema{ preventCrossKeyspaceReads: map[string]bool{"ks1": true}, @@ -181,7 +181,7 @@ func TestCheckCrossKeyspaceJoin(t *testing.T) { }, { name: "composite mixed-keyspace lhs, rhs denied", - lhs: &Join{binaryOperator: binaryOperator{LHS: makeRoute(ks1), RHS: makeRoute(ks2)}}, + lhs: &Join{LHS: makeRoute(ks1), RHS: makeRoute(ks2)}, rhs: makeRoute(&vindexes.Keyspace{Name: "ks3"}), vschema: &mockVSchema{ preventCrossKeyspaceReads: map[string]bool{"ks3": true}, @@ -266,12 +266,12 @@ func TestOperatorKeyspaces(t *testing.T) { }, { name: "multi-input same keyspace returns single keyspace", - op: &Join{binaryOperator: binaryOperator{LHS: makeRoute(ks1), RHS: makeRoute(ks1)}}, + op: &Join{LHS: makeRoute(ks1), RHS: makeRoute(ks1)}, expected: []*vindexes.Keyspace{ks1}, }, { name: "multi-input different keyspaces returns both", - op: &Join{binaryOperator: binaryOperator{LHS: makeRoute(ks1), RHS: makeRoute(ks2)}}, + op: &Join{LHS: makeRoute(ks1), RHS: makeRoute(ks2)}, expected: []*vindexes.Keyspace{ks1, ks2}, }, { diff --git a/go/vt/vtgate/planbuilder/plan_test_vindex.go b/go/vt/vtgate/planbuilder/plan_test_vindex.go index c1be424d3fd..c3abe837c12 100644 --- a/go/vt/vtgate/planbuilder/plan_test_vindex.go +++ b/go/vt/vtgate/planbuilder/plan_test_vindex.go @@ -207,6 +207,7 @@ func (*unqLkpVdxBackfill) NeedsVCursor() bool { return false } func (*unqLkpVdxBackfill) AllowBatch() bool { return true } func (*unqLkpVdxBackfill) AutoCommitEnabled() bool { return false } func (*unqLkpVdxBackfill) GetCommitOrder() vtgatepb.CommitOrder { return vtgatepb.CommitOrder_NORMAL } + func (*unqLkpVdxBackfill) Verify(context.Context, vindexes.VCursor, []sqltypes.Value, [][]byte) ([]bool, error) { return []bool{}, nil } diff --git a/go/vt/vtgate/semantics/dependencies.go b/go/vt/vtgate/semantics/dependencies.go index a0e289529f4..8d6cc91b3ee 100644 --- a/go/vt/vtgate/semantics/dependencies.go +++ b/go/vt/vtgate/semantics/dependencies.go @@ -52,11 +52,9 @@ type ( func createCertain(direct TableSet, recursive TableSet, qt evalengine.Type) *certain { c := &certain{ - dependency: dependency{ - certain: true, - direct: direct, - recursive: recursive, - }, + certain: true, + direct: direct, + recursive: recursive, } if qt.Valid() && qt.Type() != querypb.Type_NULL_TYPE { c.typ = qt @@ -66,11 +64,9 @@ func createCertain(direct TableSet, recursive TableSet, qt evalengine.Type) *cer func createUncertain(direct TableSet, recursive TableSet) *uncertain { return &uncertain{ - dependency: dependency{ - certain: false, - direct: direct, - recursive: recursive, - }, + certain: false, + direct: direct, + recursive: recursive, } } diff --git a/go/vt/vtgate/semantics/foreign_keys_test.go b/go/vt/vtgate/semantics/foreign_keys_test.go index 67619c686e8..0d51d70e0fa 100644 --- a/go/vt/vtgate/semantics/foreign_keys_test.go +++ b/go/vt/vtgate/semantics/foreign_keys_test.go @@ -572,9 +572,7 @@ func pkInfo(parentTable *vindexes.BaseTable, pCols []string, cCols []string) vin func makeTableCollector(si SchemaInformation, tables ...TableInfo) *tableCollector { return &tableCollector{ - earlyTableCollector: earlyTableCollector{ - Tables: tables, - si: si, - }, + Tables: tables, + si: si, } } diff --git a/go/vt/vtgate/semantics/table_set_test.go b/go/vt/vtgate/semantics/table_set_test.go index 73ad938e682..85cfba93f65 100644 --- a/go/vt/vtgate/semantics/table_set_test.go +++ b/go/vt/vtgate/semantics/table_set_test.go @@ -42,16 +42,16 @@ func TestTableSet_IsOverlapping(t *testing.T) { func TestTableSet_IsSolvedBy(t *testing.T) { assert.True(t, F1.IsSolvedBy(F12)) - assert.False(t, (F12).IsSolvedBy(F1)) + assert.False(t, F12.IsSolvedBy(F1)) assert.False(t, F3.IsSolvedBy(F12)) - assert.False(t, (F12).IsSolvedBy(F3)) + assert.False(t, F12.IsSolvedBy(F3)) } func TestTableSet_Constituents(t *testing.T) { - assert.Equal(t, []TableSet{F1, F2, F3}, (F123).Constituents()) - assert.Equal(t, []TableSet{F1, F2}, (F12).Constituents()) - assert.Equal(t, []TableSet{F1, F3}, (F1.Merge(F3)).Constituents()) - assert.Equal(t, []TableSet{F2, F3}, (F2.Merge(F3)).Constituents()) + assert.Equal(t, []TableSet{F1, F2, F3}, F123.Constituents()) + assert.Equal(t, []TableSet{F1, F2}, F12.Constituents()) + assert.Equal(t, []TableSet{F1, F3}, F1.Merge(F3).Constituents()) + assert.Equal(t, []TableSet{F2, F3}, F2.Merge(F3).Constituents()) assert.Empty(t, EmptyTableSet().Constituents()) } diff --git a/go/vt/vtgate/vindexes/consistent_lookup_test.go b/go/vt/vtgate/vindexes/consistent_lookup_test.go index 13e9fc7f742..0ea089fa883 100644 --- a/go/vt/vtgate/vindexes/consistent_lookup_test.go +++ b/go/vt/vtgate/vindexes/consistent_lookup_test.go @@ -494,7 +494,7 @@ func createConsistentLookup(t *testing.T, name string, writeOnly bool) SingleCol func newTestContext() context.Context { type testContextKey string // keep static checks from complaining about built-in types as context keys - return context.WithValue(context.Background(), (testContextKey)("test"), "foo") + return context.WithValue(context.Background(), testContextKey("test"), "foo") } var _ VCursor = (*loggingVCursor)(nil) diff --git a/go/vt/vtgate/vindexes/vschema_test.go b/go/vt/vtgate/vindexes/vschema_test.go index 0cdcac070ae..41159ea518d 100644 --- a/go/vt/vtgate/vindexes/vschema_test.go +++ b/go/vt/vtgate/vindexes/vschema_test.go @@ -126,8 +126,11 @@ func (*stLN) Verify(context.Context, VCursor, []sqltypes.Value, [][]byte) ([]boo func (*stLN) Map(ctx context.Context, vcursor VCursor, ids []sqltypes.Value) ([]key.ShardDestination, error) { return nil, nil } + func (*stLN) Create(context.Context, VCursor, [][]sqltypes.Value, [][]byte, bool) error { return nil } -func (*stLN) Delete(context.Context, VCursor, [][]sqltypes.Value, []byte) error { return nil } + +func (*stLN) Delete(context.Context, VCursor, [][]sqltypes.Value, []byte) error { return nil } + func (*stLN) Update(context.Context, VCursor, []sqltypes.Value, []byte, []sqltypes.Value) error { return nil } @@ -157,8 +160,11 @@ func (*stLU) Verify(context.Context, VCursor, []sqltypes.Value, [][]byte) ([]boo func (*stLU) Map(ctx context.Context, vcursor VCursor, ids []sqltypes.Value) ([]key.ShardDestination, error) { return nil, nil } + func (*stLU) Create(context.Context, VCursor, [][]sqltypes.Value, [][]byte, bool) error { return nil } -func (*stLU) Delete(context.Context, VCursor, [][]sqltypes.Value, []byte) error { return nil } + +func (*stLU) Delete(context.Context, VCursor, [][]sqltypes.Value, []byte) error { return nil } + func (*stLU) Update(context.Context, VCursor, []sqltypes.Value, []byte, []sqltypes.Value) error { return nil } @@ -192,8 +198,11 @@ func (*stLO) Verify(context.Context, VCursor, []sqltypes.Value, [][]byte) ([]boo func (*stLO) Map(ctx context.Context, vcursor VCursor, ids []sqltypes.Value) ([]key.ShardDestination, error) { return nil, nil } + func (*stLO) Create(context.Context, VCursor, [][]sqltypes.Value, [][]byte, bool) error { return nil } -func (*stLO) Delete(context.Context, VCursor, [][]sqltypes.Value, []byte) error { return nil } + +func (*stLO) Delete(context.Context, VCursor, [][]sqltypes.Value, []byte) error { return nil } + func (*stLO) Update(context.Context, VCursor, []sqltypes.Value, []byte, []sqltypes.Value) error { return nil } diff --git a/go/vt/vtorc/inst/analysis.go b/go/vt/vtorc/inst/analysis.go index e1242a1b836..c8f4e6b0321 100644 --- a/go/vt/vtorc/inst/analysis.go +++ b/go/vt/vtorc/inst/analysis.go @@ -178,8 +178,9 @@ func hasMinSemiSyncAckers(durabler policy.Durabler, primary *topodatapb.Tablet, func (detectionAnalysis *DetectionAnalysis) MarshalJSON() ([]byte, error) { i := struct { DetectionAnalysis - }{} - i.DetectionAnalysis = *detectionAnalysis + }{ + DetectionAnalysis: *detectionAnalysis, + } return json.Marshal(i) } diff --git a/go/vt/vtorc/inst/instance.go b/go/vt/vtorc/inst/instance.go index 88ab6c04dbb..54a1c9fc263 100644 --- a/go/vt/vtorc/inst/instance.go +++ b/go/vt/vtorc/inst/instance.go @@ -115,8 +115,9 @@ func NewInstance() *Instance { func (instance *Instance) MarshalJSON() ([]byte, error) { i := struct { Instance - }{} - i.Instance = *instance + }{ + Instance: *instance, + } return json.Marshal(i) } diff --git a/go/vt/vttablet/grpctmclient/cached_client_flaky_test.go b/go/vt/vttablet/grpctmclient/cached_client_flaky_test.go index 7f0bf7e1b96..1413508b69e 100644 --- a/go/vt/vttablet/grpctmclient/cached_client_flaky_test.go +++ b/go/vt/vttablet/grpctmclient/cached_client_flaky_test.go @@ -318,7 +318,7 @@ func TestCachedConnClient(t *testing.T) { longestDials <- longestDial return case <-time.After(jitter): - jitter = time.Millisecond * (time.Duration(rand.IntN(11) + 50)) + jitter = time.Millisecond * time.Duration(rand.IntN(11)+50) attempts++ tablet := tablets[rand.IntN(len(tablets))] diff --git a/go/vt/vttablet/onlineddl/executor.go b/go/vt/vttablet/onlineddl/executor.go index 0874b371a88..862db86ee64 100644 --- a/go/vt/vttablet/onlineddl/executor.go +++ b/go/vt/vttablet/onlineddl/executor.go @@ -3731,7 +3731,7 @@ func (e *Executor) gcArtifacts(ctx context.Context) error { defer e.migrationMutex.Unlock() query, err := sqlparser.ParseAndBind(sqlSelectUncollectedArtifacts, - sqltypes.Int64BindVariable(int64((retainOnlineDDLTables).Seconds())), + sqltypes.Int64BindVariable(int64(retainOnlineDDLTables.Seconds())), ) if err != nil { return err @@ -4866,10 +4866,10 @@ func (e *Executor) SubmitMigration( log.Info(fmt.Sprintf("SubmitMigration: request to submit migration %s; action=%s, table=%s", onlineDDL.UUID, actionStr, onlineDDL.Table)) revertedUUID, _ := onlineDDL.GetRevertUUID(e.env.Environment().Parser()) // Empty value if the migration is not actually a REVERT. Safe to ignore error. - retainArtifactsSeconds := int64((retainOnlineDDLTables).Seconds()) + retainArtifactsSeconds := int64(retainOnlineDDLTables.Seconds()) if retainArtifacts, _ := onlineDDL.StrategySetting().RetainArtifactsDuration(); retainArtifacts != 0 { // Explicit retention indicated by `--retain-artifact` DDL strategy flag for this migration. Override! - retainArtifactsSeconds = int64((retainArtifacts).Seconds()) + retainArtifactsSeconds = int64(retainArtifacts.Seconds()) } cutoverThreshold, err := onlineDDL.StrategySetting().CutOverThreshold() if err != nil { diff --git a/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go b/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go index 49d0b30bf55..33401984c8b 100644 --- a/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go +++ b/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go @@ -2252,12 +2252,12 @@ func TestExternalizeLookupVindex(t *testing.T) { expectedWorkflowStopCalls := preWorkflowStopCalls if tcase.expectStopped { // We expect the RPC to be called on each target shard. - expectedWorkflowStopCalls = preWorkflowStopCalls + (len(targetShards)) + expectedWorkflowStopCalls = preWorkflowStopCalls + len(targetShards) } expectedWorkflowDeleteCalls := preWorkflowDeleteCalls if tcase.expectDeleted { // We expect the RPC to be called on each target shard. - expectedWorkflowDeleteCalls = preWorkflowDeleteCalls + (len(targetShards)) + expectedWorkflowDeleteCalls = preWorkflowDeleteCalls + len(targetShards) } require.Equal(t, expectedWorkflowStopCalls, tenv.tmc.workflowStopCalls) require.Equal(t, expectedWorkflowDeleteCalls, tenv.tmc.workflowDeleteCalls) @@ -2905,7 +2905,7 @@ func TestCompleteLookupVindex(t *testing.T) { expectedWorkflowDeleteCalls := preWorkflowDeleteCalls if tcase.expectDelete { // We expect the RPC to be called on each target shard. - expectedWorkflowDeleteCalls = preWorkflowDeleteCalls + (len(targetShards)) + expectedWorkflowDeleteCalls = preWorkflowDeleteCalls + len(targetShards) } require.Equal(t, expectedWorkflowDeleteCalls, tenv.tmc.workflowDeleteCalls) diff --git a/go/vt/vttablet/tabletmanager/vreplication/vcopier.go b/go/vt/vttablet/tabletmanager/vreplication/vcopier.go index a3fcf121029..8e08c1c0de7 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/vcopier.go +++ b/go/vt/vttablet/tabletmanager/vreplication/vcopier.go @@ -902,8 +902,7 @@ func partitionTaskErrors(errs []error) (root, dependent []error) { if e == nil { continue } - var dbf *dependentBatchFailure - if errors.As(e, &dbf) { + if _, ok := errors.AsType[*dependentBatchFailure](e); ok { dependent = append(dependent, e) } else { root = append(root, e) diff --git a/go/vt/vttablet/tabletserver/dt_executor_test.go b/go/vt/vttablet/tabletserver/dt_executor_test.go index 5918d28f201..6e00fce846d 100644 --- a/go/vt/vttablet/tabletserver/dt_executor_test.go +++ b/go/vt/vttablet/tabletserver/dt_executor_test.go @@ -690,15 +690,17 @@ func newTestTxExecutor(t *testing.T, ctx context.Context) (txe *DTExecutor, tsv db.AddQuery("delete from _vt.redo_statement where dtid = _binary'aa'", &sqltypes.Result{}) db.AddQuery("update test_table set `name` = 2 where pk = 1 limit 10001", &sqltypes.Result{}) db.AddRejectedQuery("bogus", sqlerror.NewSQLError(sqlerror.ERUnknownError, sqlerror.SSUnknownSQLState, "bogus query")) - return &DTExecutor{ - ctx: ctx, - logStats: logStats, - te: tsv.te, - qe: qe, - }, tsv, db, func() { - db.Close() - tsv.StopService() - } + txe = &DTExecutor{ + ctx: ctx, + logStats: logStats, + te: tsv.te, + qe: qe, + } + closer = func() { + db.Close() + tsv.StopService() + } + return txe, tsv, db, closer } // newShortAgeExecutor is same as newTestTxExecutor, but shorter transaction abandon age. diff --git a/go/vt/vttablet/tabletserver/query_executor_test.go b/go/vt/vttablet/tabletserver/query_executor_test.go index 9e09537893f..92892e86f3a 100644 --- a/go/vt/vttablet/tabletserver/query_executor_test.go +++ b/go/vt/vttablet/tabletserver/query_executor_test.go @@ -577,54 +577,42 @@ func TestExecDDLSchemaTableCountLimit(t *testing.T) { setup }{ { - name: "below_limit_create_passes_gate", - setup: setup{ - limit: 10, - preloadedTables: []string{"a", "b"}, - query: "create table c (id int primary key)", - }, + name: "below_limit_create_passes_gate", + limit: 10, + preloadedTables: []string{"a", "b"}, + query: "create table c (id int primary key)", }, { - name: "at_limit_plain_create_rejected", - setup: setup{ - limit: 2, - preloadedTables: []string{"a", "b"}, - query: "create table c (id int primary key)", - wantErrContains: "schema engine table limit of 2 reached", - }, + name: "at_limit_plain_create_rejected", + limit: 2, + preloadedTables: []string{"a", "b"}, + query: "create table c (id int primary key)", + wantErrContains: "schema engine table limit of 2 reached", }, { - name: "at_limit_create_view_rejected", - setup: setup{ - limit: 2, - preloadedTables: []string{"a", "b"}, - query: "create view c as select 1 from dual", - wantErrContains: "schema engine table limit of 2 reached", - }, + name: "at_limit_create_view_rejected", + limit: 2, + preloadedTables: []string{"a", "b"}, + query: "create view c as select 1 from dual", + wantErrContains: "schema engine table limit of 2 reached", }, { - name: "at_limit_if_not_exists_on_existing_passes", - setup: setup{ - limit: 2, - preloadedTables: []string{"a", "b"}, - query: "create table if not exists a (id int primary key)", - }, + name: "at_limit_if_not_exists_on_existing_passes", + limit: 2, + preloadedTables: []string{"a", "b"}, + query: "create table if not exists a (id int primary key)", }, { - name: "at_limit_create_on_existing_passes_gate", - setup: setup{ - limit: 2, - preloadedTables: []string{"a", "b"}, - query: "create table a (id int primary key)", - }, + name: "at_limit_create_on_existing_passes_gate", + limit: 2, + preloadedTables: []string{"a", "b"}, + query: "create table a (id int primary key)", }, { - name: "at_limit_temporary_passes", - setup: setup{ - limit: 2, - preloadedTables: []string{"a", "b"}, - query: "create temporary table c (id int primary key)", - }, + name: "at_limit_temporary_passes", + limit: 2, + preloadedTables: []string{"a", "b"}, + query: "create temporary table c (id int primary key)", }, } diff --git a/go/vt/vttablet/tabletserver/throttle/base/http.go b/go/vt/vttablet/tabletserver/throttle/base/http.go index bbf4662d6cf..de3948b98cb 100644 --- a/go/vt/vttablet/tabletserver/throttle/base/http.go +++ b/go/vt/vttablet/tabletserver/throttle/base/http.go @@ -60,7 +60,6 @@ func SetupHTTPClient(httpTimeout time.Duration) *http.Client { DialContext: (&net.Dialer{ Timeout: httpTimeout, KeepAlive: httpTimeout, - DualStack: true, }).DialContext, ResponseHeaderTimeout: httpTimeout, } diff --git a/go/vt/wrangler/traffic_switcher.go b/go/vt/wrangler/traffic_switcher.go index 922229f3eff..a9ce37ac3ed 100644 --- a/go/vt/wrangler/traffic_switcher.go +++ b/go/vt/wrangler/traffic_switcher.go @@ -141,15 +141,21 @@ type trafficSwitcher struct { func (ts *trafficSwitcher) TopoServer() *topo.Server { return ts.wr.ts } func (ts *trafficSwitcher) TabletManagerClient() tmclient.TabletManagerClient { return ts.wr.tmc } func (ts *trafficSwitcher) Logger() logutil.Logger { return ts.wr.logger } + func (ts *trafficSwitcher) VReplicationExec(ctx context.Context, alias *topodatapb.TabletAlias, query string) (*querypb.QueryResult, error) { return ts.wr.VReplicationExec(ctx, alias, query) } -func (ts *trafficSwitcher) ExternalTopo() *topo.Server { return ts.externalTopo } -func (ts *trafficSwitcher) MigrationType() binlogdatapb.MigrationType { return ts.migrationType } -func (ts *trafficSwitcher) IsPartialMigration() bool { return ts.isPartialMigration } -func (ts *trafficSwitcher) ReverseWorkflowName() string { return ts.reverseWorkflow } -func (ts *trafficSwitcher) SourceKeyspaceName() string { return ts.sourceKSSchema.Keyspace.Name } +func (ts *trafficSwitcher) ExternalTopo() *topo.Server { return ts.externalTopo } + +func (ts *trafficSwitcher) MigrationType() binlogdatapb.MigrationType { return ts.migrationType } + +func (ts *trafficSwitcher) IsPartialMigration() bool { return ts.isPartialMigration } + +func (ts *trafficSwitcher) ReverseWorkflowName() string { return ts.reverseWorkflow } + +func (ts *trafficSwitcher) SourceKeyspaceName() string { return ts.sourceKSSchema.Keyspace.Name } + func (ts *trafficSwitcher) SourceKeyspaceSchema() *vindexes.KeyspaceSchema { return ts.sourceKSSchema } func (ts *trafficSwitcher) Sources() map[string]*workflow.MigrationSource { return ts.sources } func (ts *trafficSwitcher) Tables() []string { return ts.tables } @@ -157,7 +163,8 @@ func (ts *trafficSwitcher) TargetKeyspaceName() string { ret func (ts *trafficSwitcher) Targets() map[string]*workflow.MigrationTarget { return ts.targets } func (ts *trafficSwitcher) WorkflowName() string { return ts.workflow } func (ts *trafficSwitcher) SourceTimeZone() string { return ts.sourceTimeZone } -func (ts *trafficSwitcher) TargetTimeZone() string { return ts.targetTimeZone } + +func (ts *trafficSwitcher) TargetTimeZone() string { return ts.targetTimeZone } func (ts *trafficSwitcher) ForAllSources(f func(source *workflow.MigrationSource) error) error { var wg sync.WaitGroup diff --git a/go/vt/wrangler/vdiff.go b/go/vt/wrangler/vdiff.go index 33a8188cdd3..fbf80c5c79a 100644 --- a/go/vt/wrangler/vdiff.go +++ b/go/vt/wrangler/vdiff.go @@ -356,11 +356,10 @@ func (wr *Wrangler) VDiff(ctx context.Context, targetKeyspace, workflowName, sou dr.ExtraRowsTarget-- dr.ProcessedRows-- dr.MatchingRows++ - // We've removed an element from both slices at the current index - // so we need to shift the counters back as well to process the - // new elements at the index and avoid using an index out of range. + // We've removed an element from the source slice at the current + // index so we need to shift the counter back as well to process + // the new element at the index and avoid an index out of range. i-- - j-- foundMatch = true break } diff --git a/go/vtbench/vtbench.go b/go/vtbench/vtbench.go index db1d60a3701..7f079635d84 100644 --- a/go/vtbench/vtbench.go +++ b/go/vtbench/vtbench.go @@ -260,8 +260,7 @@ func (bt *benchThread) clientLoop(ctx context.Context) { // classification of a *sqlerror.SQLError when present so that the // per-protocol error summary remains accurate for the mysql protocol. func errorCode(err error) vtrpcpb.Code { - var sqlErr *sqlerror.SQLError - if errors.As(err, &sqlErr) { + if sqlErr, ok := errors.AsType[*sqlerror.SQLError](err); ok { return sqlErr.VtRpcErrorCode() } return vterrors.Code(err) diff --git a/test.go b/test.go index ae1376b3d96..9843e74e3fd 100755 --- a/test.go +++ b/test.go @@ -401,7 +401,7 @@ func main() { } // Duplicate tests for flavors. - var dup []*Test + dup := make([]*Test, 0, len(tests)*len(flavors)) for _, flavor := range flavors { for _, t := range tests { test := *t @@ -723,7 +723,7 @@ func (a ByPassTime) Less(i, j int) bool { return a[i].PassTime > a[j].PassTime } func getTestsSorted(names []string, testMap map[string]*Test) []*Test { sort.Strings(names) - var tests []*Test + tests := make([]*Test, 0, len(names)) for _, name := range names { t := testMap[name] t.name = name diff --git a/tools/map-shard-for-value/map-shard-for-value_test.go b/tools/map-shard-for-value/map-shard-for-value_test.go index ca014818bb9..39eb73cd486 100644 --- a/tools/map-shard-for-value/map-shard-for-value_test.go +++ b/tools/map-shard-for-value/map-shard-for-value_test.go @@ -84,7 +84,7 @@ func TestProcess(t *testing.T) { scanner := bufio.NewScanner(reader) got, err := processValues(scanner, &tc.shardsCSV, tc.vindexType, tc.valueType) require.NoError(t, err) - require.EqualValues(t, tc.expected, got) + require.Equal(t, tc.expected, got) }) } } diff --git a/tools/rowlog/rowlog.go b/tools/rowlog/rowlog.go index 7a829bb0d5f..f5f76cbd904 100644 --- a/tools/rowlog/rowlog.go +++ b/tools/rowlog/rowlog.go @@ -395,7 +395,7 @@ func getFlavor(ctx context.Context, server, keyspace string) string { if curPos == "" { return "" } - flavor := strings.Split(curPos, "/")[0] + flavor, _, _ := strings.Cut(curPos, "/") return flavor } From 52295dfce1f0f1dc481fc0d290566dbb0e61f062 Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Sun, 23 Aug 2026 18:23:01 +0000 Subject: [PATCH 4/4] Rebuild protos Signed-off-by: Matt Lord --- go/vt/proto/binlogdata/binlogdata.pb.go | 5 ++--- go/vt/proto/query/query.pb.go | 18 ++++++------------ go/vt/proto/topodata/topodata.pb.go | 1 + go/vt/proto/vtctldata/vtctldata.pb.go | 10 +++++----- go/vt/proto/vtgate/vtgate.pb.go | 5 ++--- go/vt/proto/vtrpc/vtrpc.pb.go | 25 ++++++++++++------------- 6 files changed, 28 insertions(+), 36 deletions(-) diff --git a/go/vt/proto/binlogdata/binlogdata.pb.go b/go/vt/proto/binlogdata/binlogdata.pb.go index 84929b2b90d..0d99c5d9b54 100644 --- a/go/vt/proto/binlogdata/binlogdata.pb.go +++ b/go/vt/proto/binlogdata/binlogdata.pb.go @@ -2999,9 +2999,8 @@ type BinlogDumpGTIDRequest struct { GtidSet string `protobuf:"bytes,6,opt,name=gtid_set,json=gtidSet,proto3" json:"gtid_set,omitempty"` // Raw 2-byte flags field from COM_BINLOG_DUMP_GTID, passed through to MySQL. // Known flags: - // - // BINLOG_DUMP_NON_BLOCK (0x01) — return EOF instead of blocking when caught up - // USE_HEARTBEAT_EVENT_V2 (0x02) — use Heartbeat_event_v2 format + // BINLOG_DUMP_NON_BLOCK (0x01) — return EOF instead of blocking when caught up + // USE_HEARTBEAT_EVENT_V2 (0x02) — use Heartbeat_event_v2 format Flags uint32 `protobuf:"varint,7,opt,name=flags,proto3" json:"flags,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache diff --git a/go/vt/proto/query/query.pb.go b/go/vt/proto/query/query.pb.go index e5970142e87..3558e9f57ce 100644 --- a/go/vt/proto/query/query.pb.go +++ b/go/vt/proto/query/query.pb.go @@ -5386,22 +5386,16 @@ type StreamHealthResponse struct { // // In practice, this field is set to: // a) the last time the RPC tabletmanager.TabletExternallyReparented was - // - // called on this tablet (usually done by an external failover tool e.g. - // Orchestrator). The failover tool can call this as long as we are the - // primary i.e. even ages after the last reparent occurred. - // + // called on this tablet (usually done by an external failover tool e.g. + // Orchestrator). The failover tool can call this as long as we are the + // primary i.e. even ages after the last reparent occurred. // OR // b) the last time an active reparent was executed through a vtctl command - // - // (InitShardPrimary, PlannedReparentShard, EmergencyReparentShard) - // + // (InitShardPrimary, PlannedReparentShard, EmergencyReparentShard) // OR // c) the last time vttablet was started and it initialized its tablet type - // - // as PRIMARY because it was recorded as the shard's current primary in the - // topology (see go/vt/vttablet/tabletmanager/init_tablet.go) - // + // as PRIMARY because it was recorded as the shard's current primary in the + // topology (see go/vt/vttablet/tabletmanager/init_tablet.go) // OR // d) 0 if the vttablet is not a PRIMARY. PrimaryTermStartTimestamp int64 `protobuf:"varint,3,opt,name=primary_term_start_timestamp,json=primaryTermStartTimestamp,proto3" json:"primary_term_start_timestamp,omitempty"` diff --git a/go/vt/proto/topodata/topodata.pb.go b/go/vt/proto/topodata/topodata.pb.go index 09189061f23..e8ff73f412c 100644 --- a/go/vt/proto/topodata/topodata.pb.go +++ b/go/vt/proto/topodata/topodata.pb.go @@ -396,6 +396,7 @@ type Tablet struct { // about which tablet should be the primary, such as via Vitess // replication-management commands like PlannedReparentShard, // EmergencyReparentShard, and TabletExternallyReparented. + // PrimaryTermStartTime *vttime.Time `protobuf:"bytes,14,opt,name=primary_term_start_time,json=primaryTermStartTime,proto3" json:"primary_term_start_time,omitempty"` // default_conn_collation is the default connection collation used by this tablet. DefaultConnCollation uint32 `protobuf:"varint,16,opt,name=default_conn_collation,json=defaultConnCollation,proto3" json:"default_conn_collation,omitempty"` diff --git a/go/vt/proto/vtctldata/vtctldata.pb.go b/go/vt/proto/vtctldata/vtctldata.pb.go index 0139974f8d8..5bd64fefb0e 100644 --- a/go/vt/proto/vtctldata/vtctldata.pb.go +++ b/go/vt/proto/vtctldata/vtctldata.pb.go @@ -2296,11 +2296,11 @@ type ApplyVSchemaResponse struct { // UnknownVindexParams is a map of vindex name to params that were not recognized by the vindex // type. E.g.: // - // { - // "lookup_vdx": { - // "params": ["raed_lock", "not_verify"] - // } - // } + // { + // "lookup_vdx": { + // "params": ["raed_lock", "not_verify"] + // } + // } UnknownVindexParams map[string]*ApplyVSchemaResponse_ParamList `protobuf:"bytes,2,rep,name=unknown_vindex_params,json=unknownVindexParams,proto3" json:"unknown_vindex_params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache diff --git a/go/vt/proto/vtgate/vtgate.pb.go b/go/vt/proto/vtgate/vtgate.pb.go index 8c6ff068b0f..10239e362ed 100644 --- a/go/vt/proto/vtgate/vtgate.pb.go +++ b/go/vt/proto/vtgate/vtgate.pb.go @@ -1872,9 +1872,8 @@ type BinlogDumpGTIDRequest struct { GtidSet string `protobuf:"bytes,8,opt,name=gtid_set,json=gtidSet,proto3" json:"gtid_set,omitempty"` // flags is the raw 2-byte flags field passed through to MySQL. // Known flags: - // - // BINLOG_DUMP_NON_BLOCK (0x01) — return EOF instead of blocking when caught up - // USE_HEARTBEAT_EVENT_V2 (0x02) — use Heartbeat_event_v2 format + // BINLOG_DUMP_NON_BLOCK (0x01) — return EOF instead of blocking when caught up + // USE_HEARTBEAT_EVENT_V2 (0x02) — use Heartbeat_event_v2 format Flags uint32 `protobuf:"varint,9,opt,name=flags,proto3" json:"flags,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache diff --git a/go/vt/proto/vtrpc/vtrpc.pb.go b/go/vt/proto/vtrpc/vtrpc.pb.go index d1303c5ff82..888b0450779 100644 --- a/go/vt/proto/vtrpc/vtrpc.pb.go +++ b/go/vt/proto/vtrpc/vtrpc.pb.go @@ -91,19 +91,18 @@ const ( // // A litmus test that may help a service implementor in deciding // between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE: - // - // (a) Use UNAVAILABLE if the client can retry just the failing call. - // (b) Use ABORTED if the client should retry at a higher-level - // (e.g., restarting a read-modify-write sequence). - // (c) Use FAILED_PRECONDITION if the client should not retry until - // the system state has been explicitly fixed. E.g., if an "rmdir" - // fails because the directory is non-empty, FAILED_PRECONDITION - // should be returned since the client should not retry unless - // they have first fixed up the directory by deleting files from it. - // (d) Use FAILED_PRECONDITION if the client performs conditional - // REST Get/Update/Delete on a resource and the resource on the - // server does not match the condition. E.g., conflicting - // read-modify-write on the same resource. + // (a) Use UNAVAILABLE if the client can retry just the failing call. + // (b) Use ABORTED if the client should retry at a higher-level + // (e.g., restarting a read-modify-write sequence). + // (c) Use FAILED_PRECONDITION if the client should not retry until + // the system state has been explicitly fixed. E.g., if an "rmdir" + // fails because the directory is non-empty, FAILED_PRECONDITION + // should be returned since the client should not retry unless + // they have first fixed up the directory by deleting files from it. + // (d) Use FAILED_PRECONDITION if the client performs conditional + // REST Get/Update/Delete on a resource and the resource on the + // server does not match the condition. E.g., conflicting + // read-modify-write on the same resource. Code_FAILED_PRECONDITION Code = 9 // ABORTED indicates the operation was aborted, typically due to a // concurrency issue like sequencer check failures, transaction aborts,