-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
panic on marshaling values obtained from unexported field #463
Comments
Thanks for the report. Do you have some minimal sample code reproducing the bug? |
https://play.golang.org/p/WxT-pwqhNx4 will reproduce the bug. Having an embedded type which is unexported. |
Still getting it on V3 in 2022 when trying to marshal a ECS service response from aws-sdk-go-v2 This is the struct it's panicing on marshalling https://github.com/aws/aws-sdk-go-v2/blob/main/service/ecs/types/types.go#L2826-L3007 Can confirm fix by @nirekin works
|
When can we expect a buggfix to be released @niemeyer |
Why not fix it? |
I encountered this error today so raised another PR and added 2 simple unit tests. |
Output
Analysis :
yaml/encode.go
Lines 98 to 103 in 7b8349a
Solution :
in.CanInterface()
should be called beforeInterface()
in order to be sure it won't panicThe text was updated successfully, but these errors were encountered: