summaryrefslogtreecommitdiffstats
path: root/routers/web/admin/emails.go
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 /routers/web/admin/emails.go
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 'routers/web/admin/emails.go')
-rw-r--r--routers/web/admin/emails.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/routers/web/admin/emails.go b/routers/web/admin/emails.go
index cbf0ec5e98..b94f9d72c4 100644
--- a/routers/web/admin/emails.go
+++ b/routers/web/admin/emails.go
@@ -101,9 +101,7 @@ func Emails(ctx *context.Context) {
ctx.HTML(http.StatusOK, tplEmails)
}
-var (
- nullByte = []byte{0x00}
-)
+var nullByte = []byte{0x00}
func isKeywordValid(keyword string) bool {
return !bytes.Contains([]byte(keyword), nullByte)
@@ -111,7 +109,6 @@ func isKeywordValid(keyword string) bool {
// ActivateEmail serves a POST request for activating/deactivating a user's email
func ActivateEmail(ctx *context.Context) {
-
truefalse := map[string]bool{"1": true, "0": false}
uid := ctx.FormInt64("uid")