Пример #1
0
func run(cmd *gocli.Command, args []string) {
	if len(args) != 0 {
		cmd.Usage()
		os.Exit(2)
	}

	app.MustInit()

	if err := runMain(); err != nil {
		log.Fatalln("\nError: " + err.Error())
	}
}
Пример #2
0
// Fatal logs the error and exists the program with os.Exit(1).
func Fatal(err error) {
	Log(err)
	log.Fatalln("\nFatal error: " + err.Error())
}