Open
Description
According to the EDF documentation (https://docs.ergo.services/networking/network-transparency#edf-ergo-framework-data-format):
"All child elements in the registered structures must be public. If you need to encode/decode structures with private fields, you will need to implement a custom encoder/decoder for that data type."
However, based on my testing and code review (
Line 241 in 74c15c2
Should we add the corresponding exported field check to align with the documentation? This would help prevent unintended exposure of private fields and match the framework's design specifications.
Activity
halturin commentedon Mar 6, 2025
Good catch. Sure, it needs to be checked on the registration. Would you mind making a PR (with a unit-test for this case)?
fix(edf): skip unexported fields during structure registration
chopdown commentedon Mar 6, 2025
I've submitted a PR (#210 ) to address the issue.
As I'm still learning Go, there might be areas where I missed idiomatic patterns or best practices. Please feel free to point out any adjustments needed in the PR review — whether it's code structure, error handling, or style preferences. Thank you!