utils_misc.go: print error on fatal exit

This commit is contained in:
Adhityaa 2018-06-22 19:15:12 +05:30
parent f158e7e62c
commit c1c2a19842

View File

@ -2,6 +2,7 @@ package main
import ( import (
"bytes" "bytes"
"fmt"
"os" "os"
) )
@ -11,6 +12,7 @@ func concat(a bytes.Buffer, b bytes.Buffer) []byte {
func exitIfError(err error) { func exitIfError(err error) {
if err != nil { if err != nil {
fmt.Printf("fatal error: %v\n", err)
os.Exit(1) os.Exit(1)
} }
} }