cmd/p2psim: add exit error output and exit code

This commit is contained in:
terasum 2018-07-03 12:17:40 +08:00
parent 1990c9e621
commit f4b0578f77

View file

@ -180,7 +180,10 @@ func main() {
}, },
}, },
} }
app.Run(os.Args) if err := app.Run(os.Args); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
} }
func showNetwork(ctx *cli.Context) error { func showNetwork(ctx *cli.Context) error {