diff options
author | 6543 <6543@obermui.de> | 2022-01-20 18:46:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 18:46:10 +0100 |
commit | 54e9ee37a7a301dbe74d46fd3c87712e6120e9bf (patch) | |
tree | 1be12fb072625c1b896b9d72f7912b018aad502b /routers/web/base.go | |
parent | 1d98d205f5825f40110e6628b61a97c91ac7f72d (diff) | |
download | gitea-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 'routers/web/base.go')
-rw-r--r-- | routers/web/base.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/web/base.go b/routers/web/base.go index fd942d3c87..f7eb003cc4 100644 --- a/routers/web/base.go +++ b/routers/web/base.go @@ -92,7 +92,7 @@ func storageHandler(storageSetting setting.Storage, prefix string, objStore stor return } - //If we have matched and access to release or issue + // If we have matched and access to release or issue fr, err := objStore.Open(rPath) if err != nil { if os.IsNotExist(err) || errors.Is(err, os.ErrNotExist) { @@ -125,7 +125,7 @@ func (d *dataStore) GetData() map[string]interface{} { // Recovery returns a middleware that recovers from any panics and writes a 500 and a log if so. // This error will be created with the gitea 500 page. func Recovery() func(next http.Handler) http.Handler { - var rnd = templates.HTMLRenderer() + rnd := templates.HTMLRenderer() return func(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { defer func() { @@ -136,14 +136,14 @@ func Recovery() func(next http.Handler) http.Handler { sessionStore := session.GetSession(req) - var lc = middleware.Locale(w, req) - var store = dataStore{ + lc := middleware.Locale(w, req) + store := dataStore{ "Language": lc.Language(), "CurrentURL": setting.AppSubURL + req.URL.RequestURI(), "i18n": lc, } - var user = context.GetContextUser(req) + user := context.GetContextUser(req) if user == nil { // Get user from session if logged in - do not attempt to sign-in user = auth.SessionUser(sessionStore) |