From 1adbb78a02c37c55545e9f143f135d3995c1884d Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Wed, 16 Mar 2016 14:07:46 +0900 Subject: cli: fix json output Signed-off-by: ISHIDA Wataru --- gobgp/cmd/root.go | 4 +--- 1 file changed, 1 insertion(+), 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) } }() } -- cgit v1.2.3