aboutsummaryrefslogtreecommitdiffstats
path: root/modules/indexer/code/wrapped.go
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2020-02-20 21:53:55 +0200
committerGitHub <noreply@github.com>2020-02-20 16:53:55 -0300
commit3c45cf8494fcd29e1a99b0ee6f253808eb607053 (patch)
treecd0e6347bcd2bfc42c18408169a8757ca1dda920 /modules/indexer/code/wrapped.go
parentefbd7ca39bde69ff84d4b309bee99edfe2977521 (diff)
downloadgitea-3c45cf8494fcd29e1a99b0ee6f253808eb607053.tar.gz
gitea-3c45cf8494fcd29e1a99b0ee6f253808eb607053.zip
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
Diffstat (limited to 'modules/indexer/code/wrapped.go')
-rw-r--r--modules/indexer/code/wrapped.go6
1 files changed, 3 insertions, 3 deletions
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)
}