From 8ec1c14a1ab623c50827d8878d0e18e1a4daa132 Mon Sep 17 00:00:00 2001 From: "Jyny C.Y. Chen" Date: Tue, 8 Dec 2020 22:59:33 +0800 Subject: [PATCH] fix: index of ReadJSONProtobuf options --- context/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/context.go b/context/context.go index aaffe103..b5e139b2 100644 --- a/context/context.go +++ b/context/context.go @@ -2407,7 +2407,7 @@ func (ctx *Context) ReadJSONProtobuf(ptr proto.Message, opts ...ProtoUnmarshalOp opt := defaultProtobufUnmarshalOptions if len(opts) > 0 { - opt = opts[1] + opt = opts[0] } return opt.Unmarshal(rawData, ptr)