gitlab.com/evatix-go/core@v1.3.55/regexnew/CreateApplicableLock.go (about) 1 package regexnew 2 3 import "regexp" 4 5 // CreateApplicableLock 6 // 7 // calls Create with mutex lock and unlock. 8 func CreateApplicableLock(regularExpressionPattern string) ( 9 regEx *regexp.Regexp, 10 err error, 11 isApplicable bool, 12 ) { 13 regexMutex.Lock() 14 defer regexMutex.Unlock() 15 16 regex, err := Create(regularExpressionPattern) 17 18 return regex, err, err != nil && regEx != nil 19 }