ceph-csi/vendor/k8s.io/kube-openapi/pkg/common/restfuladapter/adapter.go
dependabot[bot] 07b05616a0 rebase: bump k8s.io/kubernetes from 1.26.2 to 1.27.2
Bumps [k8s.io/kubernetes](https://github.com/kubernetes/kubernetes) from 1.26.2 to 1.27.2.
- [Release notes](https://github.com/kubernetes/kubernetes/releases)
- [Commits](https://github.com/kubernetes/kubernetes/compare/v1.26.2...v1.27.2)

---
updated-dependencies:
- dependency-name: k8s.io/kubernetes
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-06 12:21:43 +00:00

16 lines
431 B
Go

package restfuladapter
import (
"github.com/emicklei/go-restful/v3"
"k8s.io/kube-openapi/pkg/common"
)
// AdaptWebServices adapts a slice of restful.WebService into the common interfaces.
func AdaptWebServices(webServices []*restful.WebService) []common.RouteContainer {
var containers []common.RouteContainer
for _, ws := range webServices {
containers = append(containers, &WebServiceAdapter{ws})
}
return containers
}