Skip to content
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

parser: support unmashalling to all basic type pointers #214

Merged
merged 1 commit into from Nov 9, 2019

Conversation

jstewmon
Copy link
Contributor

@jstewmon jstewmon commented Nov 8, 2019

What problem should be fixed?

Unmashalling to a pointer field facilitates distinguishing between a key being undefined and being defined with the type's zero value. This is useful for cases where an application defines a default value, which is not the type's zero value and the config should be able to set the field value to the type's zero value.

This feature was already supported for *bool - I have extended the capability to all of the supported basic types.

Have you added test cases to catch the problem?

Yes, I have extended the existing test to cover all of the new types.

@unknwon
Copy link
Member

unknwon commented Nov 9, 2019

Thank you!

@unknwon unknwon changed the title support unmashalling to all basic type pointers parser: support unmashalling to all basic type pointers Nov 9, 2019
@unknwon unknwon merged commit d544aa9 into go-ini:master Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants