separated GetLanguageType and languagesType map in different files due to a better generation files

This commit is contained in:
Manuel Carmona
2017-05-03 12:17:54 +02:00
parent cbf44205e0
commit 6f3ad6d30d
7 changed files with 467 additions and 508 deletions

View File

@ -4,27 +4,6 @@ package slinguist
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: fe8b44ab8a225b1ffa75b983b916ea22fee5b6f7
type Type int
const (
// Language's type. Either data, programming, markup, prose, or unknown.
Unknown Type = iota
Data
Programming
Markup
Prose
)
// GetLanguageType returns the given language's type.
func GetLanguageType(language string) (langType Type) {
langType, ok := languagesType[language]
if !ok {
langType = Unknown
}
return langType
}
var languagesType = map[string]Type{
"Scaml": Markup,
"Scheme": Programming,