pkg/common/must.go   A
last analyzed

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 5
dl 0
loc 9
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A common.Must 0 3 2
1
package common
2
3
import "github.com/pkg/errors"
4
5
// Must accepts an error in input, if the error is not nil it panics
6
// It helps to simplify code where no error is expected.
7
func Must(err error) {
8
	if err != nil {
9
		panic(errors.WithStack(err))
10
	}
11
}
12