Skip to content

Commit

Permalink
clarify GetLanguages usage
Browse files Browse the repository at this point in the history
Signed-off-by: Denys Smirnov <[email protected]>
  • Loading branch information
Denys Smirnov authored and dennwc committed Jul 30, 2018
1 parent 180e8b6 commit 8da8516
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8da8516

Please sign in to comment.