error.go 236 Bytes
Newer Older
Jonny Schäfer's avatar
Jonny Schäfer committed
1
2
3
4
5
6
7
8
9
10
package main

import (
	"log"
)

// errorCare exits the program with a message if an error occured
func errorCare(err error) {
	if err != nil {
		cliReset()
11
		termClose()
Jonny Schäfer's avatar
Jonny Schäfer committed
12
13
14
		log.Fatal("An Error occured: ", err, "\n\nI am Sorry :(")
	}
}