mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	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 <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
			
			
This commit is contained in:
		@@ -168,7 +168,7 @@ func (prs PullRequestList) loadAttributes(ctx context.Context) error {
 | 
			
		||||
		Where("id > 0").
 | 
			
		||||
		In("id", issueIDs).
 | 
			
		||||
		Find(&issues); err != nil {
 | 
			
		||||
		return fmt.Errorf("find issues: %v", err)
 | 
			
		||||
		return fmt.Errorf("find issues: %w", err)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	set := make(map[int64]*Issue)
 | 
			
		||||
@@ -205,7 +205,7 @@ func (prs PullRequestList) InvalidateCodeComments(ctx context.Context, doer *use
 | 
			
		||||
		Where("type = ? and invalidated = ?", CommentTypeCode, false).
 | 
			
		||||
		In("issue_id", issueIDs).
 | 
			
		||||
		Find(&codeComments); err != nil {
 | 
			
		||||
		return fmt.Errorf("find code comments: %v", err)
 | 
			
		||||
		return fmt.Errorf("find code comments: %w", err)
 | 
			
		||||
	}
 | 
			
		||||
	for _, comment := range codeComments {
 | 
			
		||||
		if err := comment.CheckInvalidation(repo, doer, branch); err != nil {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user