From 5005a0cfaec3dd1732f6f52deaf9c218a1389e5a Mon Sep 17 00:00:00 2001 From: Sam Woodard Date: Wed, 25 May 2016 09:14:49 -0700 Subject: [PATCH] Add method passthrough to runtime --- runtime.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/runtime.go b/runtime.go index 20d76d0..ef451eb 100644 --- a/runtime.go +++ b/runtime.go @@ -4,6 +4,7 @@ import ( "crypto/rand" "fmt" "io" + "reflect" "time" ) @@ -50,6 +51,15 @@ func (r *Runtime) UnmarshalPayload(reader io.Reader, model interface{}) error { }) } +func (r *Runtime) UnmarshalManyPayload(reader io.Reader, kind reflect.Type) (elems []interface{}, err error) { + r.instrumentCall(UnmarshalStart, UnmarshalStop, func() error { + elems, err = UnmarshalManyPayload(reader, kind) + return err + }) + + return +} + func (r *Runtime) MarshalOnePayload(w io.Writer, model interface{}) error { return r.instrumentCall(MarshalStart, MarshalStop, func() error { return MarshalOnePayload(w, model)