aboutsummaryrefslogtreecommitdiffstats
path: root/modules/setting/config_provider.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-02-08 20:31:38 +0800
committerGitHub <noreply@github.com>2024-02-08 12:31:38 +0000
commit8c6ffdac378654f9d2171ebdbc46becf1571f7fe (patch)
tree318fd4873700b766fe2940b4c027519419bab1b7 /modules/setting/config_provider.go
parent98e7e3a5f07b8bc620e26bc1ab6f7a86bccbb7cb (diff)
downloadgitea-8c6ffdac378654f9d2171ebdbc46becf1571f7fe.tar.gz
gitea-8c6ffdac378654f9d2171ebdbc46becf1571f7fe.zip
Remove unnecessary parameter (#29092)
The parameter extraConfigs has never been used anywhere. This PR just removed it. It can be taken back once it's needed.
Diffstat (limited to 'modules/setting/config_provider.go')
-rw-r--r--modules/setting/config_provider.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/modules/setting/config_provider.go b/modules/setting/config_provider.go
index 132f4acea1..3fa3f3b50b 100644
--- a/modules/setting/config_provider.go
+++ b/modules/setting/config_provider.go
@@ -196,7 +196,7 @@ func NewConfigProviderFromData(configContent string) (ConfigProvider, error) {
// NewConfigProviderFromFile load configuration from file.
// NOTE: do not print any log except error.
-func NewConfigProviderFromFile(file string, extraConfigs ...string) (ConfigProvider, error) {
+func NewConfigProviderFromFile(file string) (ConfigProvider, error) {
cfg := ini.Empty(configProviderLoadOptions())
loadedFromEmpty := true
@@ -213,12 +213,6 @@ func NewConfigProviderFromFile(file string, extraConfigs ...string) (ConfigProvi
}
}
- for _, s := range extraConfigs {
- if err := cfg.Append([]byte(s)); err != nil {
- return nil, fmt.Errorf("unable to append more config: %v", err)
- }
- }
-
cfg.NameMapper = ini.SnackCase
return &iniConfigProvider{
file: file,