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
Hey, everyone! I still can reproduce the problem with decoding the embedded pointer from this issue. Here is the code to reproduce the problem:
Expected result: map[B:map[Name:]] Actual result: map[B:0x14000132000]
map[B:map[Name:]]
map[B:0x14000132000]
package main import ( "github.com/mitchellh/mapstructure" "log" ) func main() { testMap := make(map[string]interface{}) a := A{&B{}} err := mapstructure.Decode(a, &testMap) if err != nil { panic(err) } log.Println(testMap) } type A struct { B *B } type B struct { Name string }
If you update this B struct to the following one everything works as expected:
B
type B struct { Test string `mapstructure:",omitempty"` Name string }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey, everyone! I still can reproduce the problem with decoding the embedded pointer from this issue. Here is the code to reproduce the problem:
Expected result:
map[B:map[Name:]]
Actual result:
map[B:0x14000132000]
If you update this
B
struct to the following one everything works as expected:The text was updated successfully, but these errors were encountered: