data: replace substring package with regex package

This commit is contained in:
Máximo Cuadros
2020-04-15 17:27:48 +02:00
parent b34576bd71
commit 29bc0a181b
10 changed files with 401 additions and 395 deletions

View File

@ -1,9 +1,10 @@
package data
import "gopkg.in/toqueteos/substring.v1"
import "github.com/go-enry/go-enry/v2/regex"
var DocumentationMatchers = substring.Or(
var DocumentationMatchers = []regex.EnryRegexp{
{{range $regexp := . -}}
substring.Regexp(`{{ $regexp }}`),
regex.MustCompile(`{{ $regexp }}`),
{{end -}}
)
}

View File

@ -1,9 +1,9 @@
package data
import "gopkg.in/toqueteos/substring.v1"
import "github.com/go-enry/go-enry/v2/regex"
var VendorMatchers = substring.Or(
var VendorMatchers = []regex.EnryRegexp{
{{range $regexp := . -}}
substring.Regexp(`{{ $regexp }}`),
regex.MustCompile(`{{ $regexp }}`),
{{end -}}
)
}