mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
update InterfacesFor to use GroupVersion
This commit is contained in:
@@ -78,12 +78,8 @@ var mapper, namespaceMapper meta.RESTMapper // The mappers with namespace and wi
|
||||
var admissionControl admission.Interface
|
||||
var requestContextMapper api.RequestContextMapper
|
||||
|
||||
func interfacesFor(version string) (*meta.VersionInterfaces, error) {
|
||||
gv, err := unversioned.ParseGroupVersion(version)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
switch gv {
|
||||
func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
|
||||
switch version {
|
||||
case testGroupVersion:
|
||||
return &meta.VersionInterfaces{
|
||||
Codec: codec,
|
||||
|
||||
Reference in New Issue
Block a user