Wrote function to print an error and exit the program
This commit is contained in:
11
errors.go
Normal file
11
errors.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
func printAndExit(errorStr string) {
|
||||
fmt.Printf("ERROR: %s\n", errorStr)
|
||||
os.Exit(1)
|
||||
}
|
Reference in New Issue
Block a user