IsVendor: move RE collation to code generation phase

test plan:
 * go test -run '^TestIsVendor$' github.com/go-enry/go-enry/v2
This commit is contained in:
Alex Bezzubov
2022-11-21 12:52:56 +01:00
parent fcb9ea7e45
commit ede9e478fe
3 changed files with 93 additions and 90 deletions

View File

@ -7,3 +7,6 @@ var VendorMatchers = []regex.EnryRegexp{
regex.MustCompile(`{{ $regexp }}`),
{{end -}}
}
// FastVendorMatcher is equivalent to matching any of the VendorMatchers.
var FastVendorMatcher = regex.MustCompile(`{{ optimize . }}`)