Use the generic Set to replace deprecated methods (#5623)

This commit is contained in:
Xinzhao Xu
2023-04-07 11:15:35 +08:00
committed by GitHub
parent 634988f529
commit 708de806f8
16 changed files with 99 additions and 110 deletions

View File

@@ -309,8 +309,8 @@ func (s *APIServer) Run(ctx context.Context) (err error) {
func (s *APIServer) buildHandlerChain(stopCh <-chan struct{}) {
requestInfoResolver := &request.RequestInfoFactory{
APIPrefixes: sets.NewString("api", "apis", "kapis", "kapi"),
GrouplessAPIPrefixes: sets.NewString("api", "kapi"),
APIPrefixes: sets.New("api", "apis", "kapis", "kapi"),
GrouplessAPIPrefixes: sets.New("api", "kapi"),
GlobalResources: []schema.GroupResource{
iamv1alpha2.Resource(iamv1alpha2.ResourcesPluralUser),
iamv1alpha2.Resource(iamv1alpha2.ResourcesPluralGlobalRole),