Skip to content

Commit

Permalink
Remove fmt.Fprintln to avoid duplicate error output
Browse files Browse the repository at this point in the history
  • Loading branch information
flrnd committed Apr 6, 2022
1 parent 0363bc6 commit 675e4e5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cmd/root.go
@@ -1,17 +1,14 @@
package cmd

import (
"fmt"
"os"

"github.com/spf13/cobra"
)

var rootCmd = &cobra.Command{Use: "gobatmon"}

func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
err := rootCmd.Execute()
if err != nil {
return
}
}

0 comments on commit 675e4e5

Please sign in to comment.