Add showimp to commands.
This commit is contained in:
@@ -45,3 +45,12 @@ func Err(exit int, err error, format string, a ...interface{}) {
|
||||
fmt.Fprintf(os.Stderr, format, a...)
|
||||
os.Exit(exit)
|
||||
}
|
||||
|
||||
// CheckFatal calls Err if err isn't nil.
|
||||
func CheckFatal(err error, format string, a ...interface{}) {
|
||||
if err == nil {
|
||||
return
|
||||
}
|
||||
|
||||
Err(ExitFailure, err, format, a...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user