diff --git a/pkg/client/apiutil/apimachinery.go b/pkg/client/apiutil/apimachinery.go index 6483e728a5..b3464c655d 100644 --- a/pkg/client/apiutil/apimachinery.go +++ b/pkg/client/apiutil/apimachinery.go @@ -50,10 +50,10 @@ func init() { // AddToProtobufScheme add the given SchemeBuilder into protobufScheme, which should // be additional types that do support protobuf. -func AddToProtobufScheme(builder runtime.SchemeBuilder) error { +func AddToProtobufScheme(addToScheme func(*runtime.Scheme) error) error { protobufSchemeLock.Lock() defer protobufSchemeLock.Unlock() - return builder.AddToScheme(protobufScheme) + return addToScheme(protobufScheme) } // NewDiscoveryRESTMapper constructs a new RESTMapper based on discovery