We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
When mapping from a struct, to a struct, either of which contain nil pointers, the mapValue function will panic on the following line:
tk, fk := toRv.Type().Kind(), fromRv.Type().Kind()
This is due to a nil pointer dereference
The following code snippet skips mapValues if either side is nil:
func (m *Mapper) mapValue(toRv, fromRv reflect.Value) (returnError error) { if !toRv.IsValid() || !fromRv.IsValid() { return }
That works for me but unsure of any unintended consequences.
Thanks,
Tom
The text was updated successfully, but these errors were encountered:
Hi!
Thanks for reporting the issue. This is indeed a bug
Would you mind checking out ac79c39? I hope this should fix your issues. If it does, I'll release a patch shortly
Sorry, something went wrong.
Closed by v0.1.1
No branches or pull requests
Hi,
When mapping from a struct, to a struct, either of which contain nil pointers, the mapValue function will panic on the following line:
tk, fk := toRv.Type().Kind(), fromRv.Type().Kind()
This is due to a nil pointer dereference
The following code snippet skips mapValues if either side is nil:
func (m *Mapper) mapValue(toRv, fromRv reflect.Value) (returnError error) { if !toRv.IsValid() || !fromRv.IsValid() { return }
That works for me but unsure of any unintended consequences.
Thanks,
Tom
The text was updated successfully, but these errors were encountered: