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:
@@ -43,7 +43,7 @@ func (unstructuredJSONScheme) Recognizes(gvk unversioned.GroupVersionKind) bool
|
||||
|
||||
func (s unstructuredJSONScheme) Decode(data []byte) (Object, error) {
|
||||
unstruct := &Unstructured{}
|
||||
if err := s.DecodeInto(data, unstruct); err != nil {
|
||||
if err := DecodeInto(s, data, unstruct); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return unstruct, nil
|
||||
|
||||
Reference in New Issue
Block a user