Skip to content

Commit 253b1ad

Browse files
Juneezeeedibble21
authored andcommitted
chore: replace golang.org/x/exp/slices with slices (aws#7686)
Signed-off-by: Eng Zer Jun <[email protected]>
1 parent 9377328 commit 253b1ad

15 files changed

+14
-21
lines changed

go.mod

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ require (
3535
github.com/samber/lo v1.49.1
3636
go.uber.org/multierr v1.11.0
3737
go.uber.org/zap v1.27.0
38-
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
3938
golang.org/x/sync v0.10.0
4039
k8s.io/api v0.32.1
4140
k8s.io/apiextensions-apiserver v0.32.1

go.sum

-2
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,6 @@ golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliY
216216
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
217217
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
218218
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
219-
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8=
220-
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY=
221219
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
222220
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
223221
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=

hack/docs/metrics_gen/main.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ import (
2424
"log"
2525
"os"
2626
"path/filepath"
27+
"slices"
2728
"sort"
2829
"strings"
2930

30-
"golang.org/x/exp/slices"
31-
3231
"github.com/samber/lo"
3332

3433
"sigs.k8s.io/karpenter/pkg/metrics"

test/hack/resource/clean/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"context"
1919
"flag"
2020
"fmt"
21+
"slices"
2122
"time"
2223

2324
"github.com/aws/aws-sdk-go-v2/config"
@@ -26,7 +27,6 @@ import (
2627
"github.com/aws/aws-sdk-go-v2/service/iam"
2728
"github.com/samber/lo"
2829
"go.uber.org/zap"
29-
"golang.org/x/exp/slices"
3030

3131
"github.com/aws/karpenter-provider-aws/test/hack/resource/pkg/metrics"
3232
"github.com/aws/karpenter-provider-aws/test/hack/resource/pkg/resourcetypes"

test/hack/resource/go.mod

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ require (
99
github.com/aws/aws-sdk-go-v2/service/ec2 v1.160.0
1010
github.com/aws/aws-sdk-go-v2/service/iam v1.32.0
1111
github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.25.5
12-
github.com/samber/lo v1.39.0
12+
github.com/samber/lo v1.47.0
1313
go.uber.org/multierr v1.11.0
1414
go.uber.org/zap v1.27.0
15-
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f
1615
k8s.io/api v0.30.0
1716
)
1817

test/hack/resource/go.sum

+2-4
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
6868
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
6969
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
7070
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
71-
github.com/samber/lo v1.39.0 h1:4gTz1wUhNYLhFSKl6O+8peW0v2F4BCY034GRpU9WnuA=
72-
github.com/samber/lo v1.39.0/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
71+
github.com/samber/lo v1.47.0 h1:z7RynLwP5nbyRscyvcD043DWYoOcYRv3mV8lBeqOCLc=
72+
github.com/samber/lo v1.47.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU=
7373
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
7474
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
7575
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -87,8 +87,6 @@ go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
8787
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
8888
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
8989
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
90-
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY=
91-
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI=
9290
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
9391
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
9492
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=

test/hack/resource/pkg/resourcetypes/eni.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ package resourcetypes
1616

1717
import (
1818
"context"
19+
"slices"
1920
"time"
2021

2122
"github.com/aws/aws-sdk-go-v2/aws"
2223
"github.com/aws/aws-sdk-go-v2/service/ec2"
2324
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
2425
"github.com/samber/lo"
2526
"go.uber.org/multierr"
26-
"golang.org/x/exp/slices"
2727
)
2828

2929
type ENI struct {

test/hack/resource/pkg/resourcetypes/instance.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ package resourcetypes
1616

1717
import (
1818
"context"
19+
"slices"
1920
"time"
2021

2122
"github.com/aws/aws-sdk-go-v2/service/ec2"
2223
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
2324
"github.com/samber/lo"
2425
"go.uber.org/multierr"
25-
"golang.org/x/exp/slices"
2626
)
2727

2828
type Instance struct {

test/hack/resource/pkg/resourcetypes/instanceprofile.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ package resourcetypes
1616

1717
import (
1818
"context"
19+
"slices"
1920
"time"
2021

2122
"github.com/aws/aws-sdk-go-v2/config"
2223
"github.com/aws/aws-sdk-go-v2/service/iam"
2324
iamtypes "github.com/aws/aws-sdk-go-v2/service/iam/types"
2425
"github.com/samber/lo"
2526
"go.uber.org/multierr"
26-
"golang.org/x/exp/slices"
2727
v1 "k8s.io/api/core/v1"
2828
)
2929

test/hack/resource/pkg/resourcetypes/launchtemplate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ package resourcetypes
1616

1717
import (
1818
"context"
19+
"slices"
1920
"time"
2021

2122
"github.com/aws/aws-sdk-go-v2/service/ec2"
2223
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
2324
"github.com/samber/lo"
2425
"go.uber.org/multierr"
25-
"golang.org/x/exp/slices"
2626
)
2727

2828
type LaunchTemplate struct {

test/hack/resource/pkg/resourcetypes/oidc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package resourcetypes
1616

1717
import (
1818
"context"
19+
"slices"
1920
"strings"
2021
"time"
2122

@@ -24,7 +25,6 @@ import (
2425
iamtypes "github.com/aws/aws-sdk-go-v2/service/iam/types"
2526
"github.com/samber/lo"
2627
"go.uber.org/multierr"
27-
"golang.org/x/exp/slices"
2828
)
2929

3030
type OIDC struct {

test/hack/resource/pkg/resourcetypes/securitygroup.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ package resourcetypes
1616

1717
import (
1818
"context"
19+
"slices"
1920
"time"
2021

2122
"github.com/aws/aws-sdk-go-v2/aws"
2223
"github.com/aws/aws-sdk-go-v2/service/ec2"
2324
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
2425
"github.com/samber/lo"
2526
"go.uber.org/multierr"
26-
"golang.org/x/exp/slices"
2727
)
2828

2929
type SecurityGroup struct {

test/hack/resource/pkg/resourcetypes/stack.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ package resourcetypes
1616

1717
import (
1818
"context"
19+
"slices"
1920
"time"
2021

2122
"github.com/aws/aws-sdk-go-v2/service/cloudformation"
2223
cloudformationtypes "github.com/aws/aws-sdk-go-v2/service/cloudformation/types"
2324
"github.com/samber/lo"
2425
"go.uber.org/multierr"
25-
"golang.org/x/exp/slices"
2626
)
2727

2828
type Stack struct {

test/hack/resource/pkg/resourcetypes/vpc_endpoint.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ package resourcetypes
1616

1717
import (
1818
"context"
19+
"slices"
1920
"time"
2021

2122
"github.com/aws/aws-sdk-go-v2/service/ec2"
2223
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
2324
"github.com/samber/lo"
24-
"golang.org/x/exp/slices"
2525
)
2626

2727
type VPCEndpoint struct {

test/hack/resource/pkg/resourcetypes/vpc_peering_connection.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ package resourcetypes
1616

1717
import (
1818
"context"
19+
"slices"
1920
"time"
2021

2122
"github.com/aws/aws-sdk-go-v2/service/ec2"
2223
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
2324
"github.com/samber/lo"
24-
"golang.org/x/exp/slices"
2525
)
2626

2727
type VPCPeeringConnection struct {

0 commit comments

Comments
 (0)