aboutsummaryrefslogtreecommitdiff
path: root/internal/route/repo
diff options
context:
space:
mode:
authordeepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>2022-03-06 15:59:45 +0800
committerGitHub <noreply@github.com>2022-03-06 15:59:45 +0800
commit2d609b8b31ab3dea7e9ae3f315e945082b23e8ad (patch)
tree6b42670f567bdbc598abe5ca9f619dc608b49f36 /internal/route/repo
parent3acc13038dfe5e0643112140d329c6eb0ed4cd6a (diff)
autofix: types of function parameters can be combined (#6800)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Diffstat (limited to 'internal/route/repo')
-rw-r--r--internal/route/repo/editor.go2
-rw-r--r--internal/route/repo/webhook.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/route/repo/editor.go b/internal/route/repo/editor.go
index ee004803..6556187e 100644
--- a/internal/route/repo/editor.go
+++ b/internal/route/repo/editor.go
@@ -32,7 +32,7 @@ const (
// 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/internal/route/repo/webhook.go b/internal/route/repo/webhook.go
index 8e4b3a11..43148822 100644
--- a/internal/route/repo/webhook.go
+++ b/internal/route/repo/webhook.go
@@ -135,7 +135,7 @@ func isLocalHostname(hostname string) bool {
return false
}
-func validateWebhook(actor *db.User, l macaron.Locale, w *db.Webhook) (field string, msg string, ok bool) {
+func validateWebhook(actor *db.User, l macaron.Locale, w *db.Webhook) (field, msg string, ok bool) {
if !actor.IsAdmin {
// 🚨 SECURITY: Local addresses must not be allowed by non-admins to prevent SSRF,
// see https://github.com/gogs/gogs/issues/5366 for details.