mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-10 13:32:24 +00:00
23 lines
379 B
Go
23 lines
379 B
Go
package slinguist
|
|
|
|
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
|
|
}
|