mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 15:05:20 +00:00
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:
@@ -66,7 +66,7 @@ func DecodeList(objects []Object, decoders ...ObjectDecoder) []error {
|
||||
if !decoder.Recognizes(gv.WithKind(t.Kind)) {
|
||||
continue
|
||||
}
|
||||
obj, err := decoder.Decode(t.RawJSON)
|
||||
obj, err := Decode(decoder, t.RawJSON)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user