Hide common codec methods under helpers
The pending codec -> conversion split changes the signature of Encode and Decode to be more complicated. Create a stub helper with the exact semantics of today and do the simple mechanical refactor here to reduce the cost of that change.
This commit is contained in:
@@ -153,7 +153,7 @@ func AddToNodeAddresses(addresses *[]NodeAddress, addAddresses ...NodeAddress) {
|
||||
}
|
||||
|
||||
func HashObject(obj runtime.Object, codec runtime.Codec) (string, error) {
|
||||
data, err := codec.Encode(obj)
|
||||
data, err := runtime.Encode(codec, obj)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
Reference in New Issue
Block a user