mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
Add custom conversion function system.
As an example, demonstrate how Env.Key's deprecation ought to work.
This commit is contained in:
@@ -44,10 +44,6 @@ func convert(obj interface{}) (interface{}, error) {
|
||||
func init() {
|
||||
api.AddKnownTypes("", Simple{}, SimpleList{})
|
||||
api.AddKnownTypes("v1beta1", Simple{}, SimpleList{})
|
||||
api.AddExternalConversion("Simple", convert)
|
||||
api.AddInternalConversion("Simple", convert)
|
||||
api.AddExternalConversion("SimpleList", convert)
|
||||
api.AddInternalConversion("SimpleList", convert)
|
||||
}
|
||||
|
||||
// TODO: This doesn't reduce typing enough to make it worth the less readable errors. Remove.
|
||||
|
||||
Reference in New Issue
Block a user