package cli import ( "fmt" "os" ) // A helper function to handle errors in the program. If it is given an error, // the program will exist, and print the error. func HandleError(err error) { if err == nil { return } fmt.Fprintln(os.Stderr, "ERROR:", err) os.Exit(1) }