Created
July 14, 2019 14:43
-
-
Save sttts/405114732c771c4a6fd6f9f98114b748 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func init() { | |
localSchemeBuilder.Register(RegisterConversions) | |
} | |
// RegisterConversions adds conversion functions to the given | |
// scheme. Public to allow building arbitrary schemes. | |
func RegisterConversions(s *runtime.Scheme) error { | |
if err := s.AddGeneratedConversionFunc((*Topping)(nil), | |
(*restaurant.Topping)(nil), | |
func(a, b interface{}, scope conversion.Scope) error { | |
return Convert_v1alpha1_Topping_To_restaurant_Topping( | |
a.(*Topping), | |
b.(*restaurant.Topping), | |
scope, | |
) | |
}, | |
); err != nil { | |
return err | |
} | |
... | |
return nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment