-
-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interface nil value not set on decoding, with panic #304
Comments
l0nax
changed the title
Interface nil value not set on decoding with panic
Interface nil value not set on decoding, with panic
May 12, 2021
2 tasks
Any updates to this issue @vmihailenco? |
@l0nax facing the same issue, despite not being merged, has it worked for you ? |
@vmihailenco have you considered this fix, are there any concerns? It seems the issue has not been addressed in the latter versions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The interface field isn't set to
nil
when msgpack code isnil
.Expected Behavior
The field value of the struct is set to
nil
.Current Behavior
Application is panic'ing:
Possible Solution
When a field is of type
interface{}
functiondecodeInterfaceValue(…)
will be called.It should be checked if the next code, is nil and the
nil
behavior should be respected by theinterfaceValue(…)
method.We've developed a patch – debugged and tested – but since we're not really familiar with the library this patch might be incomplete.
Steps to Reproduce
Context (Environment)
Detailed Description
See above
Possible Implementation
The text was updated successfully, but these errors were encountered: