theme v1
This commit is contained in:
@@ -89,6 +89,12 @@ func Init() error {
|
||||
// ini 键留空会被 int 解析为 0;<1 的值一律回退内置默认,防止上限被静默置零。
|
||||
sanitizeLimits(&Limits)
|
||||
|
||||
// 主题:默认 slug 与启用清单。段缺失时 MapTo 得到空值,运行期回退内置 default,
|
||||
// 因此老配置文件不写 [theme] 也能正常启动。
|
||||
if err := File.Section("theme").MapTo(&Theme); err != nil {
|
||||
return errors.Wrap(err, "map 'theme'")
|
||||
}
|
||||
|
||||
if err := File.Section("mail").MapTo(&Mail); err != nil {
|
||||
return errors.Wrap(err, "map 'mail'")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user