utils_misc.go: print error on fatal exit
This commit is contained in:
parent
f158e7e62c
commit
c1c2a19842
@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
@ -11,6 +12,7 @@ func concat(a bytes.Buffer, b bytes.Buffer) []byte {
|
||||
|
||||
func exitIfError(err error) {
|
||||
if err != nil {
|
||||
fmt.Printf("fatal error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user