cmd/ghcs/main: Add --version flag

- This is built into Cobra the argument parser. Now `ghcs --version`
  exists.
- When we prepare to bump the version, we need to remember to update
  this value else the Homebrew formula, GitHub releases and the `ghcs
  --version` output will be mismatched.
- Fixes https://github.com/github/ghcs/issues/16.
This commit is contained in:
Issy Long 2021-07-19 18:44:02 +01:00
parent 570a407bac
commit 4582fed1cc

View file

@ -16,9 +16,10 @@ func main() {
}
var rootCmd = &cobra.Command{
Use: "ghcs",
Short: "Codespaces",
Long: "Codespaces",
Use: "ghcs",
Short: "Codespaces",
Long: "Codespaces",
Version: "0.5.0",
}
func Execute() {