Wrote function to print an error and exit the program

master
Aadhavan Srinivasan 4 months ago
parent 461824d725
commit 71051ce7f0

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