Wrote function to print an error and exit the program

This commit is contained in:
2024-08-10 11:12:23 -05:00
parent 461824d725
commit 71051ce7f0

11
errors.go Normal file
View File

@@ -0,0 +1,11 @@
package main
import (
"fmt"
"os"
)
func printAndExit(errorStr string) {
fmt.Printf("ERROR: %s\n", errorStr)
os.Exit(1)
}