mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-05-23 16:40:08 -03:00
clarify GetLanguages usage
Signed-off-by: Denys Smirnov <denys@sourced.tech>
This commit is contained in:
parent
180e8b64c5
commit
8da8516ac1
@ -115,6 +115,8 @@ func GetLanguageBySpecificClassifier(content []byte, candidates []string, classi
|
|||||||
|
|
||||||
// GetLanguages applies a sequence of strategies based on the given filename and content
|
// GetLanguages applies a sequence of strategies based on the given filename and content
|
||||||
// to find out the most probably languages to return.
|
// to find out the most probably languages to return.
|
||||||
|
// At least one of arguments should be set. If content is missing, language detection will be based on the filename.
|
||||||
|
// The function won't read the file, given an empty content.
|
||||||
func GetLanguages(filename string, content []byte) []string {
|
func GetLanguages(filename string, content []byte) []string {
|
||||||
if IsBinary(content) {
|
if IsBinary(content) {
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user