mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +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:
@@ -1099,7 +1099,7 @@ func readOrDie(t *testing.T, req *http.Request, codec runtime.Codec) runtime.Obj
|
||||
t.Errorf("Error reading: %v", err)
|
||||
t.FailNow()
|
||||
}
|
||||
obj, err := codec.Decode(data)
|
||||
obj, err := runtime.Decode(codec, data)
|
||||
if err != nil {
|
||||
t.Errorf("error decoding: %v", err)
|
||||
t.FailNow()
|
||||
|
||||
Reference in New Issue
Block a user