Merge commit 'f955c625aded244864e83a872b396868a490dbc5' as 'go-enry'

This commit is contained in:
2024-09-04 16:33:41 -03:00
192 changed files with 528500 additions and 0 deletions

View File

@ -0,0 +1,22 @@
package data
import "github.com/go-enry/go-enry/v2/regex"
{{define "mustCompile" -}}
{{ if isRE2 . -}}
regex.MustCompile({{ . | stringVal }})
{{- else -}}
regex.MustCompileRuby({{ . | stringVal }})
{{- end -}}
{{end}}
var VendorMatchers = []regex.EnryRegexp{
{{range $re := . -}}
{{ template "mustCompile" $re }},
{{end -}}
}
// FastVendorMatcher is equivalent to matching any of the VendorMatchers.
{{with $singleRE := collateAllRegexps . -}}
var FastVendorMatcher = {{template "mustCompile" $singleRE}}
{{end}}