Closed alejandrox1 closed 5 years ago
Welcome @alejandrox1!
It looks like this is your first PR to kubernetes-sigs/legacyflag 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You can also check if kubernetes-sigs/legacyflag has its own contribution guidelines.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to Kubernetes. :smiley:
Came up with this as a possible solution for converting a pflag.FlagSet
to a legacy.FlagSet
, such as in https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-proxy/app/server.go#L454
Thank you @rosti @sttts for your comments. Just made the name change
/lgtm /approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: alejandrox1, sttts
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Thinking about this, I'm not sure it's necessary. If we use legacyflag, it can be used for all the flags on a component. It's more consistent and easier to reason about to just interface with one flag library for all the flags, so why not just switch everything over to legacyflag all at once?
In other words, I see how this new method could be useful for an incremental migration to legacyflag, but why can't the migration be atomic (and do we really want to be in the business of another incremental migration)?
This can be used to initialize a FlagSet given a pflag.FlagSet. Useful for converting pflg.FlagSets to FlagSets.
Signed-off-by: alejandrox1 alarcj137@gmail.com