diff options
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/notify/repo.go | 2 | ||||
-rw-r--r-- | routers/web/repo/compare.go | 6 | ||||
-rw-r--r-- | routers/web/repo/editor.go | 2 | ||||
-rw-r--r-- | routers/web/repo/issue.go | 2 | ||||
-rw-r--r-- | routers/web/user/auth.go | 2 | ||||
-rw-r--r-- | routers/web/user/oauth.go | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/routers/api/v1/notify/repo.go b/routers/api/v1/notify/repo.go index 83d0fa5555..8bf5d37116 100644 --- a/routers/api/v1/notify/repo.go +++ b/routers/api/v1/notify/repo.go @@ -29,7 +29,7 @@ func statusStringToNotificationStatus(status string) models.NotificationStatus { } } -func statusStringsToNotificationStatuses(statuses []string, defaultStatuses []string) []models.NotificationStatus { +func statusStringsToNotificationStatuses(statuses, defaultStatuses []string) []models.NotificationStatus { if len(statuses) == 0 { statuses = defaultStatuses } diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go index 30b1ca669e..c540cbc08a 100644 --- a/routers/web/repo/compare.go +++ b/routers/web/repo/compare.go @@ -41,7 +41,7 @@ const ( ) // setCompareContext sets context data. -func setCompareContext(ctx *context.Context, base *git.Commit, head *git.Commit, headOwner, headName string) { +func setCompareContext(ctx *context.Context, base, head *git.Commit, headOwner, headName string) { ctx.Data["BaseCommit"] = base ctx.Data["HeadCommit"] = head @@ -73,7 +73,7 @@ func RawCommitURL(owner, name string, commit *git.Commit) string { } // setPathsCompareContext sets context data for source and raw paths -func setPathsCompareContext(ctx *context.Context, base *git.Commit, head *git.Commit, headOwner, headName string) { +func setPathsCompareContext(ctx *context.Context, base, head *git.Commit, headOwner, headName string) { ctx.Data["SourcePath"] = SourceCommitURL(headOwner, headName, head) ctx.Data["RawPath"] = RawCommitURL(headOwner, headName, head) if base != nil { @@ -849,7 +849,7 @@ func ExcerptBlob(ctx *context.Context) { ctx.HTML(http.StatusOK, tplBlobExcerpt) } -func getExcerptLines(commit *git.Commit, filePath string, idxLeft int, idxRight int, chunkSize int) ([]*gitdiff.DiffLine, error) { +func getExcerptLines(commit *git.Commit, filePath string, idxLeft, idxRight, chunkSize int) ([]*gitdiff.DiffLine, error) { blob, err := commit.Tree.GetBlobByPath(filePath) if err != nil { return nil, err diff --git a/routers/web/repo/editor.go b/routers/web/repo/editor.go index ef2166d85c..12098ddc69 100644 --- a/routers/web/repo/editor.go +++ b/routers/web/repo/editor.go @@ -52,7 +52,7 @@ func renderCommitRights(ctx *context.Context) bool { // getParentTreeFields returns list of parent tree names and corresponding tree paths // based on given tree path. -func getParentTreeFields(treePath string) (treeNames []string, treePaths []string) { +func getParentTreeFields(treePath string) (treeNames, treePaths []string) { if len(treePath) == 0 { return treeNames, treePaths } diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 17c72c13fe..d55b6c96b6 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -734,7 +734,7 @@ func getFileContentFromDefaultBranch(ctx *context.Context, filename string) (str return string(bytes), true } -func setTemplateIfExists(ctx *context.Context, ctxDataKey string, possibleDirs []string, possibleFiles []string) { +func setTemplateIfExists(ctx *context.Context, ctxDataKey string, possibleDirs, possibleFiles []string) { templateCandidates := make([]string, 0, len(possibleFiles)) if ctx.FormString("template") != "" { for _, dirName := range possibleDirs { diff --git a/routers/web/user/auth.go b/routers/web/user/auth.go index 8cb55a447b..9f7796b9e5 100644 --- a/routers/web/user/auth.go +++ b/routers/web/user/auth.go @@ -541,7 +541,7 @@ func handleSignIn(ctx *context.Context, u *user_model.User, remember bool) { handleSignInFull(ctx, u, remember, true) } -func handleSignInFull(ctx *context.Context, u *user_model.User, remember bool, obeyRedirect bool) string { +func handleSignInFull(ctx *context.Context, u *user_model.User, remember, obeyRedirect bool) string { if remember { days := 86400 * setting.LogInRememberDays ctx.SetCookie(setting.CookieUserName, u.Name, days) diff --git a/routers/web/user/oauth.go b/routers/web/user/oauth.go index 3795d4e5b8..166420221d 100644 --- a/routers/web/user/oauth.go +++ b/routers/web/user/oauth.go @@ -723,7 +723,7 @@ func handleAccessTokenError(ctx *context.Context, acErr AccessTokenError) { ctx.JSON(http.StatusBadRequest, acErr) } -func handleServerError(ctx *context.Context, state string, redirectURI string) { +func handleServerError(ctx *context.Context, state, redirectURI string) { handleAuthorizeError(ctx, AuthorizeError{ ErrorCode: ErrorCodeServerError, ErrorDescription: "A server error occurred", |