-
Notifications
You must be signed in to change notification settings - Fork 175
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
Add support for nested struct array, adds feature in issue #8 #48
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Codecov Report
@@ Coverage Diff @@
## master #48 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 122 139 +17
=========================================
+ Hits 122 139 +17
Continue to review full report at Codecov.
|
I will fix the red things |
Very cool, thanks for the contribution! A few initial comments:
As for the other further improvements you mentioned...
|
Thank you for patiently explaining the practices in Golang ecosystem and being willing to accept my contribution, I am happy to learn more about the practices within the Golang ecosystem, and would make sure to propose any such refactoring changes with the collaborators before right away making them.
Following are the refactoring changes removed:
|
There's still a fair number of changes in this PR that aren't actually relevant to #8, which are making it more difficult to see what is actually necessary to satisfy that feature request. For example, is the new There's also a fair amount of additional whitespace added, and test variables renamed from I'm also not entirely sure if the new See if you can distill this down to the simplest change that would satisfy the needs of #8. |
Sorry for the delay in the updates, the Let me know if you prefer this over the other. Thank you for sharing about the Additional white space and |
Sorry, I must have missed seeing @abdulhannanali's last comment. Thanks for that cleanup, @abdulhannanali! So, it's been a while since I've looked at this, but looking again now I think there's some inconsistency in how arrays of structs are handled. If I'm reading this right (and I haven't actually tested this with code yet), it looks like arrays of structs are only expanded as embedded structs if the So while I agree that the way we handled arrays of structs today (always using their string value) is certainly not ideal, I'm thinking that a proper solution is going to be a bit more complicated and may require some refactoring. I can't spend much more time looking at this this morning, but will make myself a note to come back to this. |
Hi there Authors, Maintainers and Collaborators,
I stumbled upon #8 and saw that it was still open, I am learning golang these days so wanted to learn as well as start contributing to open source. Please accept, in case you think it's a good addition, it was a great learning experience, especially about the
reflect
library.This PR features following updates
Further improvements
I have a few more features in mind and would add these and open issues at your discretion
Thank you for the library, It's amazing!