Skip to content

Commit e85e9fb

Browse files
lunnywxiaoguang
andauthored
Update modules/setting/storage.go
Co-authored-by: wxiaoguang <[email protected]>
1 parent 31300e7 commit e85e9fb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

modules/setting/storage.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ func getStorageSection(rootCfg ConfigProvider) *ini.Section {
4747
}
4848

4949
// getStorage will read storage configurations from 4 possible ways
50-
// 1 read configurations from [$name] if the item exist
51-
// 2 read configurations from [storage.$name] if the item exist
52-
// 3 read configurations from [storage.$typ] if the item exist
53-
// 4 read configurations from [storage] if the item exist
50+
// 1 read configurations from [$name] if the setting keys exist (eg: name="attachments")
51+
// 2 read configurations from [storage.$name] if the keys exist
52+
// 3 read configurations from [storage.$type] if the keys exist (eg: type="local" or "minio")
53+
// 4 read configurations from [storage] if the keys exist
54+
// The keys in earlier section have higher priority.
5455
func getStorage(rootCfg ConfigProvider, name, typ string, targetSec *ini.Section) Storage {
5556
if targetSec == nil {
5657
targetSec, _ = rootCfg.NewSection(name)

0 commit comments

Comments
 (0)