aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorChongyi Zheng <git@zcy.dev>2023-08-29 11:47:26 -0400
committerGitHub <noreply@github.com>2023-08-29 15:47:26 +0000
commitad43486cd3ab65b5b023afb5ad5b62aa862d1345 (patch)
tree92679dc459769321159d2bf343da7887e3566334 /modules
parent3507cad6f5d164509939754f15beef6de280e743 (diff)
downloadgitea-ad43486cd3ab65b5b023afb5ad5b62aa862d1345.tar.gz
gitea-ad43486cd3ab65b5b023afb5ad5b62aa862d1345.zip
Fix some slice append usages (#26778)
Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/service.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/setting/service.go b/modules/setting/service.go
index 595ea6528f..74a7e90f7c 100644
--- a/modules/setting/service.go
+++ b/modules/setting/service.go
@@ -223,7 +223,7 @@ func loadServiceFrom(rootCfg ConfigProvider) {
Service.UserDeleteWithCommentsMaxTime = sec.Key("USER_DELETE_WITH_COMMENTS_MAX_TIME").MustDuration(0)
sec.Key("VALID_SITE_URL_SCHEMES").MustString("http,https")
Service.ValidSiteURLSchemes = sec.Key("VALID_SITE_URL_SCHEMES").Strings(",")
- schemes := make([]string, len(Service.ValidSiteURLSchemes))
+ schemes := make([]string, 0, len(Service.ValidSiteURLSchemes))
for _, scheme := range Service.ValidSiteURLSchemes {
scheme = strings.ToLower(strings.TrimSpace(scheme))
if scheme != "" {