aboutsummaryrefslogtreecommitdiffstats
path: root/modules/web/middleware
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2022-01-20 18:46:10 +0100
committerGitHub <noreply@github.com>2022-01-20 18:46:10 +0100
commit54e9ee37a7a301dbe74d46fd3c87712e6120e9bf (patch)
tree1be12fb072625c1b896b9d72f7912b018aad502b /modules/web/middleware
parent1d98d205f5825f40110e6628b61a97c91ac7f72d (diff)
downloadgitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.tar.gz
gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.zip
format with gofumpt (#18184)
* gofumpt -w -l . * gofumpt -w -l -extra . * Add linter * manual fix * change make fmt
Diffstat (limited to 'modules/web/middleware')
-rw-r--r--modules/web/middleware/flash.go6
-rw-r--r--modules/web/middleware/locale.go2
2 files changed, 3 insertions, 5 deletions
diff --git a/modules/web/middleware/flash.go b/modules/web/middleware/flash.go
index cd9b089b94..d1d4a864e3 100644
--- a/modules/web/middleware/flash.go
+++ b/modules/web/middleware/flash.go
@@ -14,10 +14,8 @@ const (
InfoFlash = "InfoMsg"
)
-var (
- // FlashNow FIXME:
- FlashNow bool
-)
+// FlashNow FIXME:
+var FlashNow bool
// Flash represents a one time data transfer between two requests.
type Flash struct {
diff --git a/modules/web/middleware/locale.go b/modules/web/middleware/locale.go
index ede38ef933..3daf5f32d4 100644
--- a/modules/web/middleware/locale.go
+++ b/modules/web/middleware/locale.go
@@ -18,7 +18,7 @@ import (
func Locale(resp http.ResponseWriter, req *http.Request) translation.Locale {
// 1. Check URL arguments.
lang := req.URL.Query().Get("lang")
- var changeLang = lang != ""
+ changeLang := lang != ""
// 2. Get language information from cookies.
if len(lang) == 0 {