aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo
diff options
context:
space:
mode:
authorOleksandr Redko <oleksandr.red+github@gmail.com>2024-10-30 21:36:24 +0200
committerGitHub <noreply@github.com>2024-10-30 19:36:24 +0000
commitf4d3aaeeb9e1b11c5495e4608a3f52f316c35758 (patch)
treee2601e11bc483e16e07afeaa0c31ad55021fe0d8 /routers/web/repo
parentdd1f67491f5e2f798a537a61c082b1bf12e47635 (diff)
downloadgitea-f4d3aaeeb9e1b11c5495e4608a3f52f316c35758.tar.gz
gitea-f4d3aaeeb9e1b11c5495e4608a3f52f316c35758.zip
refactor: remove redundant err declarations (#32381)
Diffstat (limited to 'routers/web/repo')
-rw-r--r--routers/web/repo/actions/view.go1
-rw-r--r--routers/web/repo/activity.go1
-rw-r--r--routers/web/repo/view.go1
3 files changed, 0 insertions, 3 deletions
diff --git a/routers/web/repo/actions/view.go b/routers/web/repo/actions/view.go
index 11199d69eb..20e29425a3 100644
--- a/routers/web/repo/actions/view.go
+++ b/routers/web/repo/actions/view.go
@@ -276,7 +276,6 @@ func ViewPost(ctx *context_module.Context) {
if validCursor {
length := step.LogLength - cursor.Cursor
offset := task.LogIndexes[index]
- var err error
logRows, err := actions.ReadLogs(ctx, task.LogInStorage, task.LogFilename, offset, length)
if err != nil {
ctx.Error(http.StatusInternalServerError, err.Error())
diff --git a/routers/web/repo/activity.go b/routers/web/repo/activity.go
index c8fa60f77a..4b14c28b3e 100644
--- a/routers/web/repo/activity.go
+++ b/routers/web/repo/activity.go
@@ -94,7 +94,6 @@ func ActivityAuthors(ctx *context.Context) {
timeFrom = timeUntil.Add(-time.Hour * 168)
}
- var err error
authors, err := activities_model.GetActivityStatsTopAuthors(ctx, ctx.Repo.Repository, timeFrom, 10)
if err != nil {
ctx.ServerError("GetActivityStatsTopAuthors", err)
diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go
index 9769117609..7d9281b397 100644
--- a/routers/web/repo/view.go
+++ b/routers/web/repo/view.go
@@ -143,7 +143,6 @@ func findReadmeFileInEntries(ctx *context.Context, entries []*git.TreeEntry, try
// this should be impossible; if subTreeEntry exists so should this.
continue
}
- var err error
childEntries, err := subTree.ListEntries()
if err != nil {
return "", nil, err