diff options
Diffstat (limited to 'verifysetup/cmd/root.go')
-rw-r--r-- | verifysetup/cmd/root.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/verifysetup/cmd/root.go b/verifysetup/cmd/root.go new file mode 100644 index 0000000..edcb250 --- /dev/null +++ b/verifysetup/cmd/root.go @@ -0,0 +1,22 @@ +package cmd + +import ( + "github.com/spf13/cobra" + "os" +) + +var rootCmd = &cobra.Command{ + Use: "verifysetup", +} + +func init() { + rootCmd.AddCommand(NewSetupCommand()) +} + +func Execute() { + // cobra does not exit with a non-zero return code when failing + // solution from https://github.com/spf13/cobra/issues/221 + if err := rootCmd.Execute(); err != nil { + os.Exit(1) + } +} |