What ConvertUp & ConvertDown should do isn't immediately obvious.
|
// Convertible indicates that a particular type supports conversions to/from |
|
// "higher" versions of the same type. |
|
type Convertible interface { |
|
// ConvertUp up-converts the receiver into `to`. |
|
ConvertUp(ctx context.Context, to Convertible) error |
|
|
|
// ConvertDown down-converts from `from` into the receiver. |
|
ConvertDown(ctx context.Context, from Convertible) error |
|
} |
Suggested Alternative
What
ConvertUp&ConvertDownshould do isn't immediately obvious.pkg/apis/interfaces.go
Lines 37 to 45 in 79f1045
Suggested Alternative
ConvertTo&ConvertFrom