diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-07-25 00:03:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-24 18:03:58 +0200 |
commit | 9f31f3aa8ac4f6bfc8390c9ae63b2a387b414c88 (patch) | |
tree | 6f27dc68a35d1f9d806c632e36f0edc8543184ea /modules/indexer | |
parent | e0f9635c0691cb67f0fcbb758cabba801d9fc51b (diff) | |
download | gitea-9f31f3aa8ac4f6bfc8390c9ae63b2a387b414c88.tar.gz gitea-9f31f3aa8ac4f6bfc8390c9ae63b2a387b414c88.zip |
Add an abstract json layout to make it's easier to change json library (#16528)
* Add an abstract json layout to make it's easier to change json library
* Fix import
* Fix import sequence
* Fix blank lines
* Fix blank lines
Diffstat (limited to 'modules/indexer')
-rw-r--r-- | modules/indexer/code/elastic_search.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/indexer/code/elastic_search.go b/modules/indexer/code/elastic_search.go index 569917f151..a7a243e24e 100644 --- a/modules/indexer/code/elastic_search.go +++ b/modules/indexer/code/elastic_search.go @@ -18,13 +18,13 @@ import ( "code.gitea.io/gitea/modules/analyze" "code.gitea.io/gitea/modules/charset" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/typesniffer" "github.com/go-enry/go-enry/v2" - jsoniter "github.com/json-iterator/go" "github.com/olivere/elastic/v7" ) @@ -321,7 +321,6 @@ func convertResult(searchResult *elastic.SearchResult, kw string, pageSize int) repoID, fileName := parseIndexerID(hit.Id) var res = make(map[string]interface{}) - json := jsoniter.ConfigCompatibleWithStandardLibrary if err := json.Unmarshal(hit.Source, &res); err != nil { return 0, nil, nil, err } |