diff options
author | Chongyi Zheng <git@zcy.dev> | 2023-08-29 11:47:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-29 15:47:26 +0000 |
commit | ad43486cd3ab65b5b023afb5ad5b62aa862d1345 (patch) | |
tree | 92679dc459769321159d2bf343da7887e3566334 /modules | |
parent | 3507cad6f5d164509939754f15beef6de280e743 (diff) | |
download | gitea-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.go | 2 |
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 != "" { |