k8s.io/kube-openapi@v0.0.0-20240228011516-70dd3763d340/pkg/common/restfuladapter/adapter.go (about)

     1  package restfuladapter
     2  
     3  import (
     4  	"github.com/emicklei/go-restful/v3"
     5  	"k8s.io/kube-openapi/pkg/common"
     6  )
     7  
     8  // AdaptWebServices adapts a slice of restful.WebService into the common interfaces.
     9  func AdaptWebServices(webServices []*restful.WebService) []common.RouteContainer {
    10  	var containers []common.RouteContainer
    11  	for _, ws := range webServices {
    12  		containers = append(containers, &WebServiceAdapter{ws})
    13  	}
    14  	return containers
    15  }