mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Move util.StringSet into its own package
A lot of packages use StringSet, but they don't use anything else from the util package. Moving StringSet into another package will shrink their dependency trees significantly.
This commit is contained in:
@@ -28,8 +28,8 @@ import (
|
||||
"k8s.io/kubernetes/pkg/api/validation"
|
||||
"k8s.io/kubernetes/pkg/labels"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/util"
|
||||
"k8s.io/kubernetes/pkg/util/errors"
|
||||
"k8s.io/kubernetes/pkg/util/sets"
|
||||
)
|
||||
|
||||
var FileExtensions = []string{".json", ".stdin", ".yaml", ".yml"}
|
||||
@@ -685,7 +685,7 @@ func (b *Builder) Do() *Result {
|
||||
// strings in the original order.
|
||||
func SplitResourceArgument(arg string) []string {
|
||||
out := []string{}
|
||||
set := util.NewStringSet()
|
||||
set := sets.NewString()
|
||||
for _, s := range strings.Split(arg, ",") {
|
||||
if set.Has(s) {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user