From 8da8516ac15c99c1d3496ca0c0885e88afaf3ec4 Mon Sep 17 00:00:00 2001 From: Denys Smirnov Date: Mon, 30 Jul 2018 23:29:22 +0300 Subject: [PATCH] clarify GetLanguages usage Signed-off-by: Denys Smirnov --- common.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common.go b/common.go index 9db5a69..a0dd666 100644 --- a/common.go +++ b/common.go @@ -115,6 +115,8 @@ func GetLanguageBySpecificClassifier(content []byte, candidates []string, classi // GetLanguages applies a sequence of strategies based on the given filename and content // 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 { if IsBinary(content) { return nil