From 4e2718716f790ff9fc6836b134a0ee4b05996378 Mon Sep 17 00:00:00 2001 From: Alvaro Aleman Date: Mon, 30 Nov 2020 09:41:42 -0500 Subject: [PATCH] :running: AddToProtobufScheme: Take AddToScheme, not Schemebulilder Depending on the API, the SchemeBuilder might not be exported. Since we only care about its AddToScheme, take that as argument instead. --- pkg/client/apiutil/apimachinery.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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