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:
@@ -126,7 +126,7 @@ func TestArrayOfRuntimeObject(t *testing.T) {
|
||||
}
|
||||
t.Logf("exact wire is: %s", string(obj.Items[0].RawJSON))
|
||||
|
||||
decoded, err := s.Decode(wire)
|
||||
decoded, err := runtime.Decode(s, wire)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
@@ -182,7 +182,7 @@ func TestEmbeddedObject(t *testing.T) {
|
||||
|
||||
t.Logf("Wire format is:\n%v\n", string(wire))
|
||||
|
||||
decoded, err := s.Decode(wire)
|
||||
decoded, err := runtime.Decode(s, wire)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected decode error %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user