Skip to content

Commit

Permalink
Fix deprecated sets.String usage
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
  • Loading branch information
ncdc authored and sttts committed May 19, 2023
1 parent 93e6b66 commit 999b40f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/apigen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ func writeObjects(logger logr.Logger, outputDir string, exports []*apisv1alpha1.
}
encoder := codecs.EncoderForVersion(info.Serializer, apisv1alpha1.SchemeGroupVersion)

writtenExports := sets.String{}
writtenExports := sets.New[string]()
for _, export := range exports {
out, err := runtime.Encode(encoder, export)
if err != nil {
Expand Down
8 changes: 4 additions & 4 deletions pkg/cache/client/round_tripper.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ func NewShardNameFromObjectRoundTripper(delegate http.RoundTripper, requestInfoR
return &ShardNameFromObjectRoundTripper{
delegate: delegate,
requestInfoResolver: requestInfoResolver,
supportedResources: sets.NewString(supportedResources...),
supportedVerbs: sets.NewString("create", "update", "patch"),
supportedResources: sets.New[string](supportedResources...),
supportedVerbs: sets.New[string]("create", "update", "patch"),
}
}

Expand All @@ -178,8 +178,8 @@ func NewShardNameFromObjectRoundTripper(delegate http.RoundTripper, requestInfoR
type ShardNameFromObjectRoundTripper struct {
delegate http.RoundTripper
requestInfoResolver func(*http.Request) (string, string, error) /*res, verb, err*/
supportedResources sets.String
supportedVerbs sets.String
supportedResources sets.Set[string]
supportedVerbs sets.Set[string]
}

func (c *ShardNameFromObjectRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
Expand Down

0 comments on commit 999b40f

Please sign in to comment.