Skip to content

Commit 1dd3c64

Browse files
authored
Merge pull request kubernetes#126715 from tklauser/use-go-stdlib-slices
Use Go standard library slices package instead of k8s.io/utils/strings/slices
2 parents a221d3a + 23dcd26 commit 1dd3c64

File tree

4 files changed

+3
-86
lines changed

4 files changed

+3
-86
lines changed

staging/src/k8s.io/apimachinery/pkg/labels/selector.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package labels
1818

1919
import (
2020
"fmt"
21+
"slices"
2122
"sort"
2223
"strconv"
2324
"strings"
@@ -27,7 +28,6 @@ import (
2728
"k8s.io/apimachinery/pkg/util/validation"
2829
"k8s.io/apimachinery/pkg/util/validation/field"
2930
"k8s.io/klog/v2"
30-
stringslices "k8s.io/utils/strings/slices"
3131
)
3232

3333
var (
@@ -313,7 +313,7 @@ func (r Requirement) Equal(x Requirement) bool {
313313
if r.operator != x.operator {
314314
return false
315315
}
316-
return stringslices.Equal(r.strValues, x.strValues)
316+
return slices.Equal(r.strValues, x.strValues)
317317
}
318318

319319
// Empty returns true if the internalSelector doesn't restrict selection space

staging/src/k8s.io/kubectl/pkg/cmd/apply/apply_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"net/http"
2626
"os"
2727
"path/filepath"
28+
"slices"
2829
"strings"
2930
"testing"
3031
"time"
@@ -60,7 +61,6 @@ import (
6061
"k8s.io/kubectl/pkg/scheme"
6162
"k8s.io/kubectl/pkg/util/openapi"
6263
"k8s.io/utils/ptr"
63-
"k8s.io/utils/strings/slices"
6464
"sigs.k8s.io/yaml"
6565
)
6666

vendor/k8s.io/utils/strings/slices/slices.go

Lines changed: 0 additions & 82 deletions
This file was deleted.

vendor/modules.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,6 @@ k8s.io/utils/path
12191219
k8s.io/utils/pointer
12201220
k8s.io/utils/ptr
12211221
k8s.io/utils/strings
1222-
k8s.io/utils/strings/slices
12231222
k8s.io/utils/trace
12241223
# sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3
12251224
## explicit; go 1.21

0 commit comments

Comments
 (0)