-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
fix(influx): validate host urls for influx config commands #18707
Conversation
this deprecates the old flags, but they are still accessible if using them explictly. They are hidden from the -h message. When used the CLI prints out a message indicating the flag is deprecated and to use the new flag instead.
ccd406a
to
e44e739
Compare
// the short flags will still be respected but their long form is different. | ||
cmd.Flags().StringVar(&b.name, "name", "", "The config name (required)") | ||
cmd.Flags().MarkDeprecated("name", "use the --config-name flag") | ||
cmd.Flags().StringVar(&b.url, "url", "", "The host url (required)") |
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.
@sanderson these are the flags that are being deprecated. They still work, but won't show up in the -h
anymore
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.
👍
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.
LGMT!
// the short flags will still be respected but their long form is different. | ||
cmd.Flags().StringVar(&b.name, "name", "", "The config name (required)") | ||
cmd.Flags().MarkDeprecated("name", "use the --config-name flag") | ||
cmd.Flags().StringVar(&b.url, "url", "", "The host url (required)") |
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.
👍
e44e739
to
caccb66
Compare
Closes #18706
note: ignore white space for this PR, makes this body of work pretty small