Skip to content

Commit 4e27187

Browse files
committed
🏃 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.
1 parent e2261d9 commit 4e27187

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/client/apiutil/apimachinery.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ func init() {
5050

5151
// AddToProtobufScheme add the given SchemeBuilder into protobufScheme, which should
5252
// be additional types that do support protobuf.
53-
func AddToProtobufScheme(builder runtime.SchemeBuilder) error {
53+
func AddToProtobufScheme(addToScheme func(*runtime.Scheme) error) error {
5454
protobufSchemeLock.Lock()
5555
defer protobufSchemeLock.Unlock()
56-
return builder.AddToScheme(protobufScheme)
56+
return addToScheme(protobufScheme)
5757
}
5858

5959
// NewDiscoveryRESTMapper constructs a new RESTMapper based on discovery

0 commit comments

Comments
 (0)