mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Move util.CheckError to common.CheckError
This commit is contained in:
13
common/errors.go
Normal file
13
common/errors.go
Normal file
@ -0,0 +1,13 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
)
|
||||
|
||||
// CheckError checks if an error occurred (it's not nil)
|
||||
func CheckError(err error) {
|
||||
if err != nil {
|
||||
log.Fatalln(fmt.Sprintf("Error: %s", err.Error()))
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user