From 5895004be24524894acfeb5eb9dfce729bae4e5f Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Thu, 20 Jun 2024 23:56:32 +0200 Subject: [PATCH] refactor: drop golang.org/x/exp dependency (#114) Go 1.21 added the new slices package upstream so we can drop usage of x/exp and use the stdlib package. --- dev-tools/v2tool/go.mod | 1 - dev-tools/v2tool/go.sum | 2 -- go.mod | 1 - go.sum | 2 -- pkg/client/chunk/expected.go | 2 +- pkg/client/chunk/expected_test.go | 2 +- pkg/client/chunk/observed.go | 2 +- pkg/client/chunk/observed_test.go | 2 +- 8 files changed, 4 insertions(+), 10 deletions(-) diff --git a/dev-tools/v2tool/go.mod b/dev-tools/v2tool/go.mod index 520f275..129a58b 100644 --- a/dev-tools/v2tool/go.mod +++ b/dev-tools/v2tool/go.mod @@ -37,7 +37,6 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.21.0 // indirect - golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect golang.org/x/net v0.23.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/dev-tools/v2tool/go.sum b/dev-tools/v2tool/go.sum index 20fa7b6..8b63159 100644 --- a/dev-tools/v2tool/go.sum +++ b/dev-tools/v2tool/go.sum @@ -87,8 +87,6 @@ go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= -golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= diff --git a/go.mod b/go.mod index f0d6a4e..316eba9 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,6 @@ require ( github.com/hashicorp/go-multierror v1.1.1 github.com/magefile/mage v1.13.0 github.com/stretchr/testify v1.8.2 - golang.org/x/exp v0.0.0-20231127185646-65229373498e google.golang.org/grpc v1.56.3 google.golang.org/protobuf v1.33.0 ) diff --git a/go.sum b/go.sum index 03dabaa..e3ed79a 100644 --- a/go.sum +++ b/go.sum @@ -40,8 +40,6 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= -golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/pkg/client/chunk/expected.go b/pkg/client/chunk/expected.go index 63ca0e2..a1ef122 100644 --- a/pkg/client/chunk/expected.go +++ b/pkg/client/chunk/expected.go @@ -5,9 +5,9 @@ package chunk import ( + "slices" "time" - "golang.org/x/exp/slices" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" protobuf "google.golang.org/protobuf/proto" diff --git a/pkg/client/chunk/expected_test.go b/pkg/client/chunk/expected_test.go index d3e23ab..0159627 100644 --- a/pkg/client/chunk/expected_test.go +++ b/pkg/client/chunk/expected_test.go @@ -6,6 +6,7 @@ package chunk import ( "fmt" + "slices" "strings" "testing" "time" @@ -13,7 +14,6 @@ import ( "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" gproto "google.golang.org/protobuf/proto" "google.golang.org/protobuf/testing/protocmp" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/pkg/client/chunk/observed.go b/pkg/client/chunk/observed.go index 5a86213..fea0879 100644 --- a/pkg/client/chunk/observed.go +++ b/pkg/client/chunk/observed.go @@ -5,9 +5,9 @@ package chunk import ( + "slices" "time" - "golang.org/x/exp/slices" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" protobuf "google.golang.org/protobuf/proto" diff --git a/pkg/client/chunk/observed_test.go b/pkg/client/chunk/observed_test.go index c2f6cf7..e78a6a0 100644 --- a/pkg/client/chunk/observed_test.go +++ b/pkg/client/chunk/observed_test.go @@ -6,6 +6,7 @@ package chunk import ( "fmt" + "slices" "strings" "testing" "time" @@ -13,7 +14,6 @@ import ( "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" gproto "google.golang.org/protobuf/proto" "google.golang.org/protobuf/testing/protocmp" "google.golang.org/protobuf/types/known/structpb"