Skip to content

Commit 6d55a13

Browse files
Gustedlunny
Gusted
andauthored
1 parent fa0e2d6 commit 6d55a13

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

routers/web/repo/issue.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2557,7 +2557,7 @@ func updateAttachments(item interface{}, files []string) error {
25572557
case *models.Comment:
25582558
attachments = content.Attachments
25592559
default:
2560-
return fmt.Errorf("Unknown Type: %T", content)
2560+
return fmt.Errorf("unknown Type: %T", content)
25612561
}
25622562
for i := 0; i < len(attachments); i++ {
25632563
if util.IsStringInSlice(attachments[i].UUID, files) {
@@ -2575,7 +2575,7 @@ func updateAttachments(item interface{}, files []string) error {
25752575
case *models.Comment:
25762576
err = content.UpdateAttachments(files)
25772577
default:
2578-
return fmt.Errorf("Unknown Type: %T", content)
2578+
return fmt.Errorf("unknown Type: %T", content)
25792579
}
25802580
if err != nil {
25812581
return err
@@ -2587,7 +2587,7 @@ func updateAttachments(item interface{}, files []string) error {
25872587
case *models.Comment:
25882588
content.Attachments, err = repo_model.GetAttachmentsByCommentID(content.ID)
25892589
default:
2590-
return fmt.Errorf("Unknown Type: %T", content)
2590+
return fmt.Errorf("unknown Type: %T", content)
25912591
}
25922592
return err
25932593
}

routers/web/repo/lfs.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ func LFSLocks(ctx *context.Context) {
120120
Shared: true,
121121
}); err != nil {
122122
log.Error("Failed to clone repository: %s (%v)", ctx.Repo.Repository.FullName(), err)
123-
ctx.ServerError("LFSLocks", fmt.Errorf("Failed to clone repository: %s (%v)", ctx.Repo.Repository.FullName(), err))
123+
ctx.ServerError("LFSLocks", fmt.Errorf("failed to clone repository: %s (%v)", ctx.Repo.Repository.FullName(), err))
124124
return
125125
}
126126

127127
gitRepo, err := git.OpenRepositoryCtx(ctx, tmpBasePath)
128128
if err != nil {
129129
log.Error("Unable to open temporary repository: %s (%v)", tmpBasePath, err)
130-
ctx.ServerError("LFSLocks", fmt.Errorf("Failed to open new temporary repository in: %s %v", tmpBasePath, err))
130+
ctx.ServerError("LFSLocks", fmt.Errorf("failed to open new temporary repository in: %s %v", tmpBasePath, err))
131131
return
132132
}
133133
defer gitRepo.Close()
@@ -140,7 +140,7 @@ func LFSLocks(ctx *context.Context) {
140140

141141
if err := gitRepo.ReadTreeToIndex(ctx.Repo.Repository.DefaultBranch); err != nil {
142142
log.Error("Unable to read the default branch to the index: %s (%v)", ctx.Repo.Repository.DefaultBranch, err)
143-
ctx.ServerError("LFSLocks", fmt.Errorf("Unable to read the default branch to the index: %s (%v)", ctx.Repo.Repository.DefaultBranch, err))
143+
ctx.ServerError("LFSLocks", fmt.Errorf("unable to read the default branch to the index: %s (%v)", ctx.Repo.Repository.DefaultBranch, err))
144144
return
145145
}
146146

@@ -525,14 +525,14 @@ func LFSAutoAssociate(ctx *context.Context) {
525525
for i, oid := range oids {
526526
idx := strings.IndexRune(oid, ' ')
527527
if idx < 0 || idx+1 > len(oid) {
528-
ctx.ServerError("LFSAutoAssociate", fmt.Errorf("Illegal oid input: %s", oid))
528+
ctx.ServerError("LFSAutoAssociate", fmt.Errorf("illegal oid input: %s", oid))
529529
return
530530
}
531531
var err error
532532
metas[i] = &models.LFSMetaObject{}
533533
metas[i].Size, err = strconv.ParseInt(oid[idx+1:], 10, 64)
534534
if err != nil {
535-
ctx.ServerError("LFSAutoAssociate", fmt.Errorf("Illegal oid input: %s %v", oid, err))
535+
ctx.ServerError("LFSAutoAssociate", fmt.Errorf("illegal oid input: %s %v", oid, err))
536536
return
537537
}
538538
metas[i].Oid = oid[:idx]

routers/web/repo/webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func getOrgRepoCtx(ctx *context.Context) (*orgRepoCtx, error) {
106106
}, nil
107107
}
108108

109-
return nil, errors.New("Unable to set OrgRepo context")
109+
return nil, errors.New("unable to set OrgRepo context")
110110
}
111111

112112
func checkHookType(ctx *context.Context) string {

0 commit comments

Comments
 (0)