fix: index of ReadJSONProtobuf options

This commit is contained in:
Jyny C.Y. Chen 2020-12-08 22:59:33 +08:00
parent 8fe0d208b3
commit 8ec1c14a1a

View File

@ -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)