Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(useOptions.validate): add
Validate
function to use command
Did a bit of refactoring here. Previously, if the `qri use` command is run without any arguments, the cmd Run function (not the useOptions.Run function), would print out the cmd.Help() text. However, this breaks a few of our patterns. First, on no other command do we print the help text if no arguments are given Second, the Validate function would need to take a `*cobra.Command`. Since we are trying to modularize these functions (for clarity and for testing purposes), it seems like passing the Validate function the entire command violates the spirit of what we were doing in the last refactor.
- Loading branch information