1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00

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 opt := defaultProtobufUnmarshalOptions
if len(opts) > 0 { if len(opts) > 0 {
opt = opts[1] opt = opts[0]
} }
return opt.Unmarshal(rawData, ptr) return opt.Unmarshal(rawData, ptr)