summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gobgp/cmd/root.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/gobgp/cmd/root.go b/gobgp/cmd/root.go
index dcd69d8b..8e0bed40 100644
--- a/gobgp/cmd/root.go
+++ b/gobgp/cmd/root.go
@@ -21,7 +21,6 @@ import (
"github.com/spf13/cobra"
"net/http"
_ "net/http/pprof"
- "os"
)
var globalOpts struct {
@@ -46,8 +45,7 @@ func NewRootCmd() *cobra.Command {
if globalOpts.PprofPort > 0 {
go func() {
if err := http.ListenAndServe(fmt.Sprintf("localhost:%d", globalOpts.PprofPort), nil); err != nil {
- fmt.Println(err)
- os.Exit(1)
+ exitWithError(err)
}
}()
}