mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-27 14:47:50 -03:00
Expose GetLanguageType (#2)
This commit is contained in:
@ -5,6 +5,7 @@ package main
|
||||
|
||||
import "C"
|
||||
import "github.com/go-enry/go-enry/v2"
|
||||
import "github.com/go-enry/go-enry/v2/data"
|
||||
|
||||
//export GetLanguage
|
||||
func GetLanguage(filename string, content []byte) string {
|
||||
@ -141,10 +142,15 @@ func IsTest(path string) bool {
|
||||
return enry.IsTest(path)
|
||||
}
|
||||
|
||||
//export GetLanguageType
|
||||
func GetLanguageType(language string) string {
|
||||
return data.Type(enry.GetLanguageType(language)).String()
|
||||
}
|
||||
|
||||
func strSliceCopy(result *[]*C.char, slice []string) {
|
||||
for _, str := range slice {
|
||||
*result = append(*result, C.CString(str))
|
||||
}
|
||||
}
|
||||
|
||||
func main() {}
|
||||
func main() {}
|
Reference in New Issue
Block a user