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:
tummychow
2015-09-09 10:45:01 -07:00
parent 1313e3b14e
commit 78ce5da988
98 changed files with 473 additions and 429 deletions

View File

@@ -18,10 +18,10 @@ package aws_cloud
import (
"github.com/aws/aws-sdk-go/aws"
"k8s.io/kubernetes/pkg/util"
"k8s.io/kubernetes/pkg/util/sets"
)
func stringSetToPointers(in util.StringSet) []*string {
func stringSetToPointers(in sets.String) []*string {
if in == nil {
return nil
}
@@ -32,11 +32,11 @@ func stringSetToPointers(in util.StringSet) []*string {
return out
}
func stringSetFromPointers(in []*string) util.StringSet {
func stringSetFromPointers(in []*string) sets.String {
if in == nil {
return nil
}
out := util.NewStringSet()
out := sets.NewString()
for i := range in {
out.Insert(orEmpty(in[i]))
}