tartrazine/filename.go

11 lines
188 B
Go
Raw Normal View History

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