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
commit b7fb2b1db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)