Passed
Push — main ( 2a46cd...12059c )
by Igor
01:41
created

test/init_test.go   A

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 10
dl 0
loc 15
c 0
b 0
f 0
rs 10
1
package test
2
3
import (
4
	"testing"
5
6
	"github.com/muonsoft/validation"
7
)
8
9
func newValidator(t *testing.T, options ...validation.ValidatorOption) *validation.Validator {
10
	t.Helper()
11
	v, err := validation.NewValidator(options...)
12
	if err != nil {
13
		t.Fatal("failed to initialize validator:", err)
14
	}
15
	return v
16
}
17