Select Git revision
-
Md. Alim Ul Karim authored
# v0.6.8 - Integration Test Helper (Validators, SliceValidators, Refactoring, ReflectSlice functions) - [x] Validators - [x] SliceValidators - [x] Refactoring - [x] ReflectSlice functions See merge request !55
Md. Alim Ul Karim authored# v0.6.8 - Integration Test Helper (Validators, SliceValidators, Refactoring, ReflectSlice functions) - [x] Validators - [x] SliceValidators - [x] Refactoring - [x] ReflectSlice functions See merge request !55
NewLockIf.go 285 B
package regexnew
import "regexp"
// NewLockIf calls New with mutex lock and unlock if true.
func NewLockIf(isLock bool, regularExpressionSyntax string) (*regexp.Regexp, error) {
if isLock {
regexMutex.Lock()
defer regexMutex.Unlock()
}
return New(regularExpressionSyntax)
}