gitlab.com/evatix-go/core@v1.3.55/regexnew/MatchErrorLock.go (about) 1 package regexnew 2 3 // MatchErrorLock 4 // 5 // creates new regex using lock 6 // and then calls match. 7 // On condition mismatch returns error 8 // or else nil 9 func MatchErrorLock(regex, comparing string) error { 10 regEx, err := CreateLock(regex) 11 12 if regEx != nil && regEx.MatchString(comparing) { 13 return nil 14 } 15 16 return regExMatchValidationError( 17 regex, 18 comparing, 19 err, 20 regEx) 21 }