tartrazine/filename.go
Manuel Carmona 645bdd7331 added filenames_map.go generation
languagesByFilename now is a map[string]string
2017-04-27 17:30:57 +02:00

11 lines
188 B
Go

package slinguist
func GetLanguageByFilename(filename string) (lang string, safe bool) {
lang, safe = languagesByFilename[filename]
if lang == "" {
lang = OtherLanguage
}
return
}