-
Notifications
You must be signed in to change notification settings - Fork 55
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
Refactor string flags on apps and apis [CLI-70] #146
Conversation
@@ -289,7 +287,7 @@ auth0 apis update <id> --name myapi | |||
}, | |||
} | |||
|
|||
cmd.Flags().StringVarP(&inputs.Name, apiName, "n", "", "Name of the API.") | |||
apiName.RegisterStringU(cmd, &inputs.Name) | |||
cmd.Flags().StringVarP(&inputs.Scopes, apiScopes, "s", "", "Space-separated list of scopes.") |
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.
Scopes will be tackled on a future PR, as it needs to be changed from string flag to string slice flag, for consistency with other slice inputs
return ask(cmd, f, value, false) | ||
} | ||
|
||
func (f *Flag) AskU(cmd *cobra.Command, value interface{}) 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.
What does U stand for?
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.
It stands for "Update"
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.
Looks great!
Description
This command encapsulates and extracts the repetitive logic to define, register, configure and prompt for the value of string flags on
apps
andapis
commands.Testing
Checklist
master