mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-10 13:32:24 +00:00
created 'type Type int' for type.go generation
This commit is contained in:
parent
b277944b2a
commit
c08b85120d
@ -4,20 +4,22 @@ package slinguist
|
|||||||
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
||||||
// Extracted from github/linguist commit: {{ getCommit }}
|
// Extracted from github/linguist commit: {{ getCommit }}
|
||||||
|
|
||||||
|
type Type int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
TypeUnknown = iota
|
TypeUnknown Type = iota
|
||||||
TypeData
|
TypeData
|
||||||
TypeProgramming
|
TypeProgramming
|
||||||
TypeMarkup
|
TypeMarkup
|
||||||
TypeProse
|
TypeProse
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetLanguageType(language string) (langType int) {
|
func GetLanguageType(language string) (langType Type) {
|
||||||
langType, _ = languagesType[language]
|
langType, _ = languagesType[language]
|
||||||
return langType
|
return langType
|
||||||
}
|
}
|
||||||
|
|
||||||
var languagesType = map[string]int{
|
var languagesType = map[string]Type{
|
||||||
{{range $language, $type := . -}}
|
{{range $language, $type := . -}}
|
||||||
"{{ $language }}": {{ $type -}},
|
"{{ $language }}": {{ $type -}},
|
||||||
{{end -}}
|
{{end -}}
|
||||||
|
@ -4,20 +4,22 @@ package slinguist
|
|||||||
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
||||||
// Extracted from github/linguist commit: fe8b44ab8a225b1ffa75b983b916ea22fee5b6f7
|
// Extracted from github/linguist commit: fe8b44ab8a225b1ffa75b983b916ea22fee5b6f7
|
||||||
|
|
||||||
|
type Type int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
TypeUnknown = iota
|
TypeUnknown Type = iota
|
||||||
TypeData
|
TypeData
|
||||||
TypeProgramming
|
TypeProgramming
|
||||||
TypeMarkup
|
TypeMarkup
|
||||||
TypeProse
|
TypeProse
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetLanguageType(language string) (langType int) {
|
func GetLanguageType(language string) (langType Type) {
|
||||||
langType, _ = languagesType[language]
|
langType, _ = languagesType[language]
|
||||||
return langType
|
return langType
|
||||||
}
|
}
|
||||||
|
|
||||||
var languagesType = map[string]int{
|
var languagesType = map[string]Type{
|
||||||
"Scaml": TypeMarkup,
|
"Scaml": TypeMarkup,
|
||||||
"Scheme": TypeProgramming,
|
"Scheme": TypeProgramming,
|
||||||
"Scilab": TypeProgramming,
|
"Scilab": TypeProgramming,
|
||||||
|
@ -4,20 +4,22 @@ package slinguist
|
|||||||
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
||||||
// Extracted from github/linguist commit: fe8b44ab8a225b1ffa75b983b916ea22fee5b6f7
|
// Extracted from github/linguist commit: fe8b44ab8a225b1ffa75b983b916ea22fee5b6f7
|
||||||
|
|
||||||
|
type Type int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
TypeUnknown = iota
|
TypeUnknown Type = iota
|
||||||
TypeData
|
TypeData
|
||||||
TypeProgramming
|
TypeProgramming
|
||||||
TypeMarkup
|
TypeMarkup
|
||||||
TypeProse
|
TypeProse
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetLanguageType(language string) (langType int) {
|
func GetLanguageType(language string) (langType Type) {
|
||||||
langType, _ = languagesType[language]
|
langType, _ = languagesType[language]
|
||||||
return langType
|
return langType
|
||||||
}
|
}
|
||||||
|
|
||||||
var languagesType = map[string]int{
|
var languagesType = map[string]Type{
|
||||||
"Scaml": TypeMarkup,
|
"Scaml": TypeMarkup,
|
||||||
"Scheme": TypeProgramming,
|
"Scheme": TypeProgramming,
|
||||||
"Scilab": TypeProgramming,
|
"Scilab": TypeProgramming,
|
||||||
|
@ -4,20 +4,22 @@ package slinguist
|
|||||||
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
||||||
// Extracted from github/linguist commit: {{ getCommit }}
|
// Extracted from github/linguist commit: {{ getCommit }}
|
||||||
|
|
||||||
|
type Type int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
TypeUnknown = iota
|
TypeUnknown Type = iota
|
||||||
TypeData
|
TypeData
|
||||||
TypeProgramming
|
TypeProgramming
|
||||||
TypeMarkup
|
TypeMarkup
|
||||||
TypeProse
|
TypeProse
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetLanguageType(language string) (langType int) {
|
func GetLanguageType(language string) (langType Type) {
|
||||||
langType, _ = languagesType[language]
|
langType, _ = languagesType[language]
|
||||||
return langType
|
return langType
|
||||||
}
|
}
|
||||||
|
|
||||||
var languagesType = map[string]int{
|
var languagesType = map[string]Type{
|
||||||
{{range $language, $type := . -}}
|
{{range $language, $type := . -}}
|
||||||
"{{ $language }}": {{ $type -}},
|
"{{ $language }}": {{ $type -}},
|
||||||
{{end -}}
|
{{end -}}
|
||||||
|
8
type.go
8
type.go
@ -4,20 +4,22 @@ package slinguist
|
|||||||
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
||||||
// Extracted from github/linguist commit: dae33dc2b20cddc85d1300435c3be7118a7115a9
|
// Extracted from github/linguist commit: dae33dc2b20cddc85d1300435c3be7118a7115a9
|
||||||
|
|
||||||
|
type Type int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
TypeUnknown = iota
|
TypeUnknown Type = iota
|
||||||
TypeData
|
TypeData
|
||||||
TypeProgramming
|
TypeProgramming
|
||||||
TypeMarkup
|
TypeMarkup
|
||||||
TypeProse
|
TypeProse
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetLanguageType(language string) (langType int) {
|
func GetLanguageType(language string) (langType Type) {
|
||||||
langType, _ = languagesType[language]
|
langType, _ = languagesType[language]
|
||||||
return langType
|
return langType
|
||||||
}
|
}
|
||||||
|
|
||||||
var languagesType = map[string]int{
|
var languagesType = map[string]Type{
|
||||||
"1C Enterprise": TypeProgramming,
|
"1C Enterprise": TypeProgramming,
|
||||||
"ABAP": TypeProgramming,
|
"ABAP": TypeProgramming,
|
||||||
"ABNF": TypeData,
|
"ABNF": TypeData,
|
||||||
|
Loading…
Reference in New Issue
Block a user