From 0ebb45cfe7606adf021ad359d6fbfcefc54360a5 Mon Sep 17 00:00:00 2001 From: delvh Date: Mon, 24 Oct 2022 21:29:17 +0200 Subject: Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) Found using `find . -type f -name '*.go' -print -exec vim {} -c ':%s/fmt\.Errorf(\(.*\)%v\(.*\)err/fmt.Errorf(\1%w\2err/g' -c ':wq' \;` Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Andrew Thornton Co-authored-by: wxiaoguang --- modules/indexer/code/elastic_search.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/indexer/code/elastic_search.go') diff --git a/modules/indexer/code/elastic_search.go b/modules/indexer/code/elastic_search.go index 108a224675..dd3c9c9771 100644 --- a/modules/indexer/code/elastic_search.go +++ b/modules/indexer/code/elastic_search.go @@ -228,7 +228,7 @@ func (b *ElasticSearchIndexer) addUpdate(ctx context.Context, batchWriter git.Wr return nil, err } if size, err = strconv.ParseInt(strings.TrimSpace(stdout), 10, 64); err != nil { - return nil, fmt.Errorf("misformatted git cat-file output: %v", err) + return nil, fmt.Errorf("misformatted git cat-file output: %w", err) } } -- cgit v1.2.3