Skip to content

Commit

Permalink
🏃 AddToProtobufScheme: Take AddToScheme, not Schemebulilder
Browse files Browse the repository at this point in the history
Depending on the API, the SchemeBuilder might not be exported. Since we
only care about its AddToScheme, take that as argument instead.
  • Loading branch information
alvaroaleman committed Nov 30, 2020
1 parent e2261d9 commit 4e27187
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/client/apiutil/apimachinery.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4e27187

Please sign in to comment.