created 'type Type int' for type.go generation

This commit is contained in:
Manuel Carmona 2017-04-17 12:08:54 +02:00
parent b277944b2a
commit c08b85120d
5 changed files with 25 additions and 15 deletions

View File

@ -4,20 +4,22 @@ package slinguist
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: {{ getCommit }}
type Type int
const (
TypeUnknown = iota
TypeUnknown Type = iota
TypeData
TypeProgramming
TypeMarkup
TypeProse
)
func GetLanguageType(language string) (langType int) {
func GetLanguageType(language string) (langType Type) {
langType, _ = languagesType[language]
return langType
}
var languagesType = map[string]int{
var languagesType = map[string]Type{
{{range $language, $type := . -}}
"{{ $language }}": {{ $type -}},
{{end -}}

View File

@ -4,20 +4,22 @@ package slinguist
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: fe8b44ab8a225b1ffa75b983b916ea22fee5b6f7
type Type int
const (
TypeUnknown = iota
TypeUnknown Type = iota
TypeData
TypeProgramming
TypeMarkup
TypeProse
)
func GetLanguageType(language string) (langType int) {
func GetLanguageType(language string) (langType Type) {
langType, _ = languagesType[language]
return langType
}
var languagesType = map[string]int{
var languagesType = map[string]Type{
"Scaml": TypeMarkup,
"Scheme": TypeProgramming,
"Scilab": TypeProgramming,

View File

@ -4,20 +4,22 @@ package slinguist
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: fe8b44ab8a225b1ffa75b983b916ea22fee5b6f7
type Type int
const (
TypeUnknown = iota
TypeUnknown Type = iota
TypeData
TypeProgramming
TypeMarkup
TypeProse
)
func GetLanguageType(language string) (langType int) {
func GetLanguageType(language string) (langType Type) {
langType, _ = languagesType[language]
return langType
}
var languagesType = map[string]int{
var languagesType = map[string]Type{
"Scaml": TypeMarkup,
"Scheme": TypeProgramming,
"Scilab": TypeProgramming,

View File

@ -4,20 +4,22 @@ package slinguist
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: {{ getCommit }}
type Type int
const (
TypeUnknown = iota
TypeUnknown Type = iota
TypeData
TypeProgramming
TypeMarkup
TypeProse
)
func GetLanguageType(language string) (langType int) {
func GetLanguageType(language string) (langType Type) {
langType, _ = languagesType[language]
return langType
}
var languagesType = map[string]int{
var languagesType = map[string]Type{
{{range $language, $type := . -}}
"{{ $language }}": {{ $type -}},
{{end -}}

View File

@ -4,20 +4,22 @@ package slinguist
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: dae33dc2b20cddc85d1300435c3be7118a7115a9
type Type int
const (
TypeUnknown = iota
TypeUnknown Type = iota
TypeData
TypeProgramming
TypeMarkup
TypeProse
)
func GetLanguageType(language string) (langType int) {
func GetLanguageType(language string) (langType Type) {
langType, _ = languagesType[language]
return langType
}
var languagesType = map[string]int{
var languagesType = map[string]Type{
"1C Enterprise": TypeProgramming,
"ABAP": TypeProgramming,
"ABNF": TypeData,