aboutsummaryrefslogtreecommitdiffstats
path: root/modules/setting/queue.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-04-25 23:06:39 +0800
committerGitHub <noreply@github.com>2023-04-25 23:06:39 +0800
commit5cf7da63ee74939595b8800787dcdb4c7290fa4f (patch)
tree39f6c9c6e2a0e78e63949b9299f52a8954abe0bc /modules/setting/queue.go
parent56d4893b2a996da6388801c9c8ff16b9b588ad55 (diff)
downloadgitea-5cf7da63ee74939595b8800787dcdb4c7290fa4f.tar.gz
gitea-5cf7da63ee74939595b8800787dcdb4c7290fa4f.zip
Refactor config provider (#24245)
This PR introduces more abstract about `ConfigProvider` and hides more `ini` references. --------- Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'modules/setting/queue.go')
-rw-r--r--modules/setting/queue.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/setting/queue.go b/modules/setting/queue.go
index bd4bf48e33..8c37e538bb 100644
--- a/modules/setting/queue.go
+++ b/modules/setting/queue.go
@@ -10,8 +10,6 @@ import (
"code.gitea.io/gitea/modules/container"
"code.gitea.io/gitea/modules/log"
-
- ini "gopkg.in/ini.v1"
)
// QueueSettings represent the settings for a queue from the ini
@@ -195,7 +193,7 @@ func handleOldLengthConfiguration(rootCfg ConfigProvider, queueName, oldSection,
// toDirectlySetKeysSet returns a set of keys directly set by this section
// Note: we cannot use section.HasKey(...) as that will immediately set the Key if a parent section has the Key
// but this section does not.
-func toDirectlySetKeysSet(section *ini.Section) container.Set[string] {
+func toDirectlySetKeysSet(section ConfigSection) container.Set[string] {
sections := make(container.Set[string])
for _, key := range section.Keys() {
sections.Add(key.Name())