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

Supported set to pointers #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

excavador
Copy link

Supported assign parsed value not only to value types (string, bool, etcetera) but also to pointer types (*string, *bool, etcetera). It's very useful to distinguish missed in config value from present in config

…etcetera) but also to pointer types (*string, *bool, etcetera). It's very useful to distinguish missed in config value from present in config
@excavador excavador force-pushed the supported-assign-to-pointers branch from 10d8e30 to 8c4db8b Compare July 15, 2020 17:51
@excavador
Copy link
Author

Any updates?

1 similar comment
@excavador
Copy link
Author

Any updates?

@nishaad78
Copy link
Contributor

nishaad78 commented Jul 24, 2020

Adding pointer values for primitive types unnecessarily adds bloat and complexity to the code.
I would recommend instead to check for zero values and either throw an error or add defaults for your use case.

@nishaad78 nishaad78 closed this Jul 24, 2020
@nishaad78
Copy link
Contributor

Can you provide a concrete example where this feature would be useful for you?

@nishaad78 nishaad78 reopened this Jul 24, 2020
@excavador
Copy link
Author

Any updates?

@excavador
Copy link
Author

@nishaad78 Sometime you need to add "default values".
When you work with default string or int you need to distinguish case "not specified" and "specified zero"

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