-
-
Notifications
You must be signed in to change notification settings - Fork 99
Golang: Support Optional Fields as Pointers #96
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
Golang: Support Optional Fields as Pointers #96
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your pull request. I've left some comments.
@xuri I think this should be ready for re-review. |
@xuri I'm still learning your contributing process to this repo: what's the best way to get your or a maintainer's review on a PR? |
Thanks for your update, will take review for this. |
@xuri the latest changes won't run the new CI step unless you approve the awaiting workflows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some new comments.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #96 +/- ##
==========================================
+ Coverage 81.77% 81.87% +0.09%
==========================================
Files 37 37
Lines 1855 1865 +10
==========================================
+ Hits 1517 1527 +10
Misses 246 246
Partials 92 92
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@xuri Thanks for the review, and the CI run! Let me know what else you need from me to get this merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for your contribution.
PR Details
Extends optional element support in Golang.
Description
Changes the Golang generator to make optional fields as pointers
Related Issue
Motivation and Context
An XSD can be defined to have optional elements (such as minOccurs=0). When this happens, its unclear on parsing if the value was truly unset in the xml, or given the zero value. Null-able optional fields allows developers to differentiate.
How Has This Been Tested
Locally ran all tests after updating generation.
Types of changes
Checklist