gitlab.com/evatix-go/core@v1.3.55/regexnew/CreateLock.go (about) 1 package regexnew 2 3 import ( 4 "regexp" 5 ) 6 7 // CreateLock calls Create with mutex lock and unlock. 8 func CreateLock(regularExpressionPattern string) (*regexp.Regexp, error) { 9 regexMutex.Lock() 10 defer regexMutex.Unlock() 11 12 return Create(regularExpressionPattern) 13 }