mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 22:53:05 -03:00
latest linguist patterns 36ba3783443275525fff7b72b633a3bccfb132cb
This commit is contained in:
@ -2,11 +2,14 @@ package slinguist
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func GetLanguageByExtension(filename string) (lang string, safe bool) {
|
||||
ext := strings.ToLower(filepath.Ext(filename))
|
||||
|
||||
lang = OtherLanguage
|
||||
langs, ok := LanguagesByExtension[filepath.Ext(filename)]
|
||||
langs, ok := LanguagesByExtension[ext]
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user