mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 09:05:30 +00:00
Introduced basic structure
This commit is contained in:
16
helpers/errors.go
Normal file
16
helpers/errors.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package helpers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
func MaybePanic(err error, msg string) {
|
||||
if err == nil {
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println(msg)
|
||||
fmt.Println("Error: ", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
Reference in New Issue
Block a user