moved generated data to data subpackage

This commit is contained in:
David Paz
2017-06-08 12:28:36 +02:00
committed by Santiago M. Mola
parent 5a8c748dbe
commit 7e827e47ef
33 changed files with 298216 additions and 297637 deletions

View File

@ -1,4 +1,4 @@
package enry
package data
// CODE GENERATED AUTOMATICALLY WITH gopkg.in/src-d/enry.v1/internal/code-generator
// THIS FILE SHOULD NOT BE EDITED BY HAND
@ -10,23 +10,23 @@ import (
type languageMatcher func ([]byte) []string
var contentMatchers = map[string]languageMatcher{
var ContentMatchers = map[string]languageMatcher{
{{ range $index, $disambiguator := . -}}
{{ printf "%q" $disambiguator.Extension }}: func(i []byte) []string {
{{ range $i, $language := $disambiguator.Languages -}}
{{- if not (avoidLanguage $language) }}
{{- if gt (len $language.Heuristics) 0 }}
{{- if gt $i 0 }} else {{ end -}}
if {{- range $j, $heuristic := $language.Heuristics }} {{ $heuristic.Name }}.Match(i)
{{- if gt $i 0 }} else {{ end -}}
if {{- range $j, $heuristic := $language.Heuristics }} {{ $heuristic.Name }}.Match(i)
{{- if lt $j (len $language.LogicRelations) }} {{index $language.LogicRelations $j}} {{- end -}} {{ end }} {
return []string{ {{- printf "%q" $language.Language -}} }
}
{{- end -}}
{{- end -}}
{{- end}}
return {{ returnLanguages $disambiguator.Languages | returnStringSlice }}
},
{{ end -}}
@ -36,4 +36,4 @@ var (
{{ range $index, $heuristic := getAllHeuristics . -}}
{{ $heuristic.Name }} = regexp.MustCompile(`{{ $heuristic.Regexp }}`)
{{ end -}}
)
)