-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
reverseproxy: Support multiple 'to' upstreams in reverse-proxy cmd #4693
reverseproxy: Support multiple 'to' upstreams in reverse-proxy cmd #4693
Conversation
Thanks for the contribution! I think it is more typical to repeat a flag than to have custom parsing within a flag's value, i.e. That said, I'm not entirely sure how nicely our flags API handles that at the moment. What do you think? |
@francislavoie Yeah, I had to look this up but I knew I did it once before, years ago. We would need to define our own type: https://stackoverflow.com/questions/45487377/golang-flag-ignore-missing-flag-and-parse-multiple-duplicate-flags Which, I think maybe that's suitable for this. It's just a few lines and very simple. I do think the CLI looks cleaner this way, personally; but maybe that's just my preference. 🤷♂️ |
Ah ok, that's not so bad. Yeah I suppose we should do it that way then 👍 |
|
@parrotmac So, did we decide to use multiple |
Rather than comma-separating in a single flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I refactored it to use multiple --to
flags rather than comma-separating them. I think it is slightly more natural. Thank you for the contribution! Sorry it took me a while.
From #4692
This is a proposal to add the ability to specify multiple upstream/
to
targets to the reverse-proxy command.Example usage:
What do we think of the implementation? Any suggestions for a different interface?