-
Notifications
You must be signed in to change notification settings - Fork 206
Utility functions and specification of EPP command line flags #1947
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Etai Lev Ran <elevran@gmail.com>
Signed-off-by: Etai Lev Ran <elevran@gmail.com>
|
Skipping CI for Draft Pull Request. |
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: elevran The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/cc @ahg-g @kfswain @nirrozenbaum for early feedback. See #1932 for some additional context. If so, follow up commits on this PR (or I can split into smaller for easier review) can
|
|
|
||
| // GetStringFlagValue retrieves the current value (default or set) of a string flag | ||
| // by name from the specified FlagSet (or flag.CommandLine if nil). | ||
| func GetStringFlagValue(fs *flag.FlagSet, name string) (string, error) { |
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.
Why not use generics here and have only one function?
That will also cover integers and other types....
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.
That's certainly possible and would genralize and simplify the code somewhat.
Wanted to keep initial code simpler as mostly looking for feedback on whether this is useful before investing more time.
What type of PR is this?
/kind feature
What this PR does / why we need it:
Allows definition of command line flags in declarative and centralized manner.
Previously split between cmd/epp/runner/runner.go and pkg/epp/server/runserver.go and handling of deprecation was manual.
Which issue(s) this PR fixes:
Fixes #1932
Does this PR introduce a user-facing change?: