diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-03-16 14:07:46 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-03-14 07:58:05 +0900 |
commit | 1adbb78a02c37c55545e9f143f135d3995c1884d (patch) | |
tree | 2ab236ca1354549dd500e51c29971c0fd39d9bb6 | |
parent | 262a736e2fe1090dfc4ba52e74e1aaac9fca7fc2 (diff) |
cli: fix json output
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
-rw-r--r-- | gobgp/cmd/root.go | 4 |
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) } }() } |