aboutsummaryrefslogtreecommitdiff
path: root/internal/cmd
diff options
context:
space:
mode:
authordeepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>2022-03-06 17:55:17 +0800
committerGitHub <noreply@github.com>2022-03-06 17:55:17 +0800
commite452d94fc842da6623c8fde67b9d71a1ee739f0a (patch)
treee8e0c1c5206bed01f4634dc81ebcbf5af77f8d65 /internal/cmd
parent2466da4e82c3658cb9e05498961ad130e0467f0d (diff)
autofix: format code with gofumpt and gofmt (#6803)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Diffstat (limited to 'internal/cmd')
-rw-r--r--internal/cmd/backup.go6
-rw-r--r--internal/cmd/cert.go1
-rw-r--r--internal/cmd/web.go4
3 files changed, 7 insertions, 4 deletions
diff --git a/internal/cmd/backup.go b/internal/cmd/backup.go
index 874b1be0..c5e17e16 100644
--- a/internal/cmd/backup.go
+++ b/internal/cmd/backup.go
@@ -42,8 +42,10 @@ portable among all supported database engines.`,
},
}
-const currentBackupFormatVersion = 1
-const archiveRootDir = "gogs-backup"
+const (
+ currentBackupFormatVersion = 1
+ archiveRootDir = "gogs-backup"
+)
func runBackup(c *cli.Context) error {
zip.Verbose = c.Bool("verbose")
diff --git a/internal/cmd/cert.go b/internal/cmd/cert.go
index 7c91c2c6..c8280a12 100644
--- a/internal/cmd/cert.go
+++ b/internal/cmd/cert.go
@@ -1,3 +1,4 @@
+//go:build cert
// +build cert
// Copyright 2009 The Go Authors. All rights reserved.
diff --git a/internal/cmd/web.go b/internal/cmd/web.go
index c4ceda17..358ff832 100644
--- a/internal/cmd/web.go
+++ b/internal/cmd/web.go
@@ -456,7 +456,6 @@ func runWeb(c *cli.Context) error {
Post(bindIgnErr(form.AddSSHKey{}), repo.SettingsDeployKeysPost)
m.Post("/delete", repo.DeleteDeployKey)
})
-
}, func(c *context.Context) {
c.Data["PageIsSettings"] = true
})
@@ -734,7 +733,8 @@ func runWeb(c *cli.Context) error {
tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
},
- }, Handler: m}
+ }, Handler: m,
+ }
err = server.ListenAndServeTLS(conf.Server.CertFile, conf.Server.KeyFile)
case "fcgi":