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

WIP: Propose new Replace() function for list flags. #215

Closed
wants to merge 2 commits into from

Conversation

therealmitchconnors
Copy link
Collaborator

This PR addresses the lack of a concrete way to replace, rather than append to, Slice and Array flags once they have been set. It creates a backdoor function which resets the changed flag on the value, allowing end users to forcibly overwrite flag values. The backdoor function is used to avoid modifying any of the go/flag compatible interfaces.

If this pattern is approved, it will need to be reproduced for all Slice and Array flag types.

@CLAassistant
Copy link

CLAassistant commented Aug 13, 2019

CLA assistant check
All committers have signed the CLA.

@eparis
Copy link
Collaborator

eparis commented Aug 14, 2019

I'm not sure I know how this would get used. What would cause a Replace()? How would I trigger such a thing from the command line?

@therealmitchconnors
Copy link
Collaborator Author

therealmitchconnors commented Aug 14, 2019 via email

@therealmitchconnors
Copy link
Collaborator Author

Replaced by #216

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

3 participants