forked from forgejo/forgejo
Uncapitalize errors (#18915)
- See: https://github.com/golang/go/wiki/CodeReviewComments#error-strings Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
fa0e2d60c2
commit
6d55a132a5
3 changed files with 9 additions and 9 deletions
|
@ -2557,7 +2557,7 @@ func updateAttachments(item interface{}, files []string) error {
|
|||
case *models.Comment:
|
||||
attachments = content.Attachments
|
||||
default:
|
||||
return fmt.Errorf("Unknown Type: %T", content)
|
||||
return fmt.Errorf("unknown Type: %T", content)
|
||||
}
|
||||
for i := 0; i < len(attachments); i++ {
|
||||
if util.IsStringInSlice(attachments[i].UUID, files) {
|
||||
|
@ -2575,7 +2575,7 @@ func updateAttachments(item interface{}, files []string) error {
|
|||
case *models.Comment:
|
||||
err = content.UpdateAttachments(files)
|
||||
default:
|
||||
return fmt.Errorf("Unknown Type: %T", content)
|
||||
return fmt.Errorf("unknown Type: %T", content)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -2587,7 +2587,7 @@ func updateAttachments(item interface{}, files []string) error {
|
|||
case *models.Comment:
|
||||
content.Attachments, err = repo_model.GetAttachmentsByCommentID(content.ID)
|
||||
default:
|
||||
return fmt.Errorf("Unknown Type: %T", content)
|
||||
return fmt.Errorf("unknown Type: %T", content)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue