Suppress help on error (#46)

This commit is contained in:
2021-04-03 15:29:34 +02:00
committed by GitHub
parent 841b0d9c5b
commit 226ee04151
2 changed files with 6 additions and 4 deletions

View File

@@ -19,9 +19,11 @@ var date string
func Execute() {
// cobra.OnInitialize(initConfig)
var rootCmd = &cobra.Command{
Use: "speedrun",
Short: "Cloud first command execution",
Version: fmt.Sprintf("%s, commit: %s, date: %s", version, commit, date),
Use: "speedrun",
Short: "Cloud first command execution",
Version: fmt.Sprintf("%s, commit: %s, date: %s", version, commit, date),
SilenceUsage: true,
SilenceErrors: true,
}
rootCmd.AddCommand(initCmd)