print fatal error and force quite app
(err error)
| 13 | |
| 14 | // print fatal error and force quite app |
| 15 | func fatalError(err error) { |
| 16 | if err != nil { |
| 17 | color.Set(color.FgRed) |
| 18 | fmt.Println(err) |
| 19 | color.Unset() |
| 20 | if app != nil { |
| 21 | app.Stop() |
| 22 | } |
| 23 | if !debug { |
| 24 | os.Exit(1) |
| 25 | } |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | // print useful info and force quite app |
| 30 | func usefulInfo(s string) { |
no outgoing calls
no test coverage detected