utils.HandleError   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
eloc 3
nop 2
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 6
rs 10
c 0
b 0
f 0
1
package utils
2
3
import "log"
4
5
// HandleError checks error and logs it if there is one
6
func HandleError(err error, message string) {
7
	if err != nil {
8
		log.Fatal(message, err.Error())
9
	}
10
}
11