1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00

Merge pull request #1688 from Jyny/fix/index-of-ReadJSONProtobuf-options

fix: index of ReadJSONProtobuf options
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-12-09 06:58:59 +02:00
committed by GitHub

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)