diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-12-10 21:29:40 +0800 |
---|---|---|
committer | Antoine GIRARD <sapk@users.noreply.github.com> | 2019-12-10 14:29:40 +0100 |
commit | 50da9f7daed4fe3e8f0c76f23eeb987e97de4962 (patch) | |
tree | ab524323c8fe0973cb831f930641d241f6d3b1ff /modules/search | |
parent | 2c83dac5d47195b7589a9e879598d00c00f1b302 (diff) | |
download | gitea-50da9f7daed4fe3e8f0c76f23eeb987e97de4962.tar.gz gitea-50da9f7daed4fe3e8f0c76f23eeb987e97de4962.zip |
Move modules/indexer to modules/indexer/code (#9301)
Diffstat (limited to 'modules/search')
-rw-r--r-- | modules/search/search.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/search/search.go b/modules/search/search.go index 9b93fe58fb..531d95b187 100644 --- a/modules/search/search.go +++ b/modules/search/search.go @@ -11,7 +11,7 @@ import ( "strings" "code.gitea.io/gitea/modules/highlight" - "code.gitea.io/gitea/modules/indexer" + code_indexer "code.gitea.io/gitea/modules/indexer/code" "code.gitea.io/gitea/modules/util" ) @@ -60,7 +60,7 @@ func writeStrings(buf *bytes.Buffer, strs ...string) error { return nil } -func searchResult(result *indexer.RepoSearchResult, startIndex, endIndex int) (*Result, error) { +func searchResult(result *code_indexer.RepoSearchResult, startIndex, endIndex int) (*Result, error) { startLineNum := 1 + strings.Count(result.Content[:startIndex], "\n") var formattedLinesBuffer bytes.Buffer @@ -113,7 +113,7 @@ func PerformSearch(repoIDs []int64, keyword string, page, pageSize int) (int, [] return 0, nil, nil } - total, results, err := indexer.SearchRepoByKeyword(repoIDs, keyword, page, pageSize) + total, results, err := code_indexer.SearchRepoByKeyword(repoIDs, keyword, page, pageSize) if err != nil { return 0, nil, err } |