From c191848e199e68a19d6e2f6d96fcbf5065ab6800 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 3 Oct 2022 16:24:21 -0700 Subject: [PATCH] [cli] Add --version / -v support (#631) --- go/cli/mcap/cmd/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/cli/mcap/cmd/root.go b/go/cli/mcap/cmd/root.go index cdd6adf702..6435ed35b6 100644 --- a/go/cli/mcap/cmd/root.go +++ b/go/cli/mcap/cmd/root.go @@ -29,7 +29,7 @@ func die(s string, args ...any) { func init() { cobra.OnInitialize(initConfig) rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "Config file (default is $HOME/.mcap.yaml)") - rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") + rootCmd.InitDefaultVersionFlag() } func initConfig() {