added type.go generation

This commit is contained in:
Manuel Carmona
2017-04-11 11:26:23 +02:00
parent 5d61ca93d8
commit ef39403555
13 changed files with 836 additions and 74 deletions

View File

@ -0,0 +1,24 @@
package slinguist
// CODE GENERATED AUTOMATICALLY WITH github.com/src-d/simple-linguist/cli/slinguist-generate
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: {{ getCommit }}
const (
TypeUnknown = iota
TypeData = iota
TypeProgramming = iota
TypeMarkup = iota
TypeProse = iota
)
func GetLanguageType(language string) (langType int) {
langType, _ = languagesType[language]
return langType
}
var languagesType = map[string]int{
{{range $language, $type := . -}}
"{{ $language }}": {{ $type -}},
{{end -}}
}