CheckIfError should be used to naively panics if an error is not nil.
(err error)
| 17 | |
| 18 | // CheckIfError should be used to naively panics if an error is not nil. |
| 19 | func CheckIfError(err error) { |
| 20 | if err == nil { |
| 21 | return |
| 22 | } |
| 23 | |
| 24 | fmt.Printf("\x1b[31;1m%s\x1b[0m\n", fmt.Sprintf("error: %s", err)) |
| 25 | os.Exit(1) |
| 26 | } |
| 27 | |
| 28 | // Info should be used to describe the example commands that are about to run. |
| 29 | func Info(format string, args ...interface{}) { |
searching dependent graphs…