-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I was trying to help which River CLI I had installed and realized there's no easy way to know this currently because it can't currently reveal its version information in any built-in way. Here, add a `river version` subcommand that prints the version of the Go module it's distributed as, along with the version of Go used to build it, making accessing version information easy. I also added support for a `river --version` flag. There's no common standard on whether version should be revealed by subcommand or flag, and since `--version`'s (unlike `-v`) never going to be used for anything else, we may as well be permissable in what we accept. I also add a basic framework for a CLI "integration" test suite that allows CLI commands to be tested from the level of the Cobra command, which is useful for checking flags and such. It has the downside in that there's no way to inject a test transaction into it, so it's not always appropriate for use right now.
- Loading branch information
Showing
6 changed files
with
261 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.