Пример #1
0
func main() {
	e := cli.RunActionWithArgs(&sendNotification{})
	switch e {
	case nil, cli.ErrorNoRoute, cli.ErrorHelpRequested:
		// ignore
	default:
		log.Fatal(e)
	}
}
Пример #2
0
func main() {
	log.SetFlags(0)
	e := cli.RunActionWithArgs(&Action{})
	switch e {
	case nil, cli.ErrorHelpRequested, cli.ErrorNoRoute:
		//
	default:
		log.Printf("ERROR: %s", e.Error())
	}
}