Suppress help on error (#46)

This commit is contained in:
2021-04-03 15:29:34 +02:00
committed by GitHub
parent 72b19bac47
commit 89a0cc64e1
2 changed files with 6 additions and 4 deletions

View File

@@ -20,7 +20,7 @@ func NewComputeClient(project string) (*ComputeClient, error) {
s, err := compute.NewService(ctx)
if err != nil {
err = fmt.Errorf("Couldn't initialize GCP client (Compute): %v", err)
err = fmt.Errorf("couldn't initialize GCP client: %v", err)
return nil, err
}
computeService := &ComputeClient{s, project}

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)