-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
Reflect package for protobuf values #67169
Comments
this appears to be a question about protobuf's internal representation. Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only. For questions please refer to https://github.com/golang/go/wiki/Questions |
@seankhliao But I feel this is a bug only where we are seeing unexpected results due to a print statement? |
Thanks a lot @seankhliao for pinging this 🙌🏼 , Though the answer is still unclear over there, I'll try to dig deep into this. Also, it would be really great if you could share some tips/reference to find existing similar GitHub issues so that I can follow before raising any issue next time. Anything apart from searching keywords related to issue on google? |
Go version
go 1.21
Output of
go env
in your module/workspace:What did you do?
I want to compare two structpb.Value using reflect.DeepEqual.
It's giving false if I try to print one of the structpb.Value before comparing them.
https://go.dev/play/p/yedwyZQzAP1
It's working fine if we don't have a print statement before comparing both.
https://go.dev/play/p/x9WhvnjvoPJ
And if we print both structpb.Value, then also code gives equal on comparison.
https://go.dev/play/p/iBB6l8mBXcs
I'm aware proto.Equal is able to compare them regardless of printing. But wanted to understand if this is a bug that after using print statement, code is giving false for comparison.
What did you see happen?
https://go.dev/play/p/yedwyZQzAP1
true
false
What did you expect to see?
https://go.dev/play/p/yedwyZQzAP1
true
true
The text was updated successfully, but these errors were encountered: