From 3c45cf8494fcd29e1a99b0ee6f253808eb607053 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Thu, 20 Feb 2020 21:53:55 +0200 Subject: Add detected file language to code search (#10256) Move langauge detection to separate module to be more reusable Add option to disable vendored file exclusion from file search Allways show all language stats for search --- modules/indexer/code/wrapped.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/indexer/code/wrapped.go') diff --git a/modules/indexer/code/wrapped.go b/modules/indexer/code/wrapped.go index 6a20883989..926597a382 100644 --- a/modules/indexer/code/wrapped.go +++ b/modules/indexer/code/wrapped.go @@ -71,12 +71,12 @@ func (w *wrappedIndexer) Delete(repoID int64) error { return indexer.Delete(repoID) } -func (w *wrappedIndexer) Search(repoIDs []int64, keyword string, page, pageSize int) (int64, []*SearchResult, error) { +func (w *wrappedIndexer) Search(repoIDs []int64, language, keyword string, page, pageSize int) (int64, []*SearchResult, []*SearchResultLanguages, error) { indexer, err := w.get() if err != nil { - return 0, nil, err + return 0, nil, nil, err } - return indexer.Search(repoIDs, keyword, page, pageSize) + return indexer.Search(repoIDs, language, keyword, page, pageSize) } -- cgit v1.2.3