diff options
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r-- | modules/setting/setting.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index cc83de7d..3945fa90 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -146,6 +146,17 @@ var ( PagingNum int } + // Release settigns + Release struct { + Attachment struct { + Enabled bool + TempPath string + AllowedTypes []string `delim:"|"` + MaxSize int64 + MaxFiles int + } `ini:"-"` + } + // Markdown sttings Markdown struct { EnableHardLineBreak bool @@ -590,6 +601,8 @@ func NewContext() { log.Fatal(2, "Fail to map HTTP settings: %v", err) } else if err = Cfg.Section("webhook").MapTo(&Webhook); err != nil { log.Fatal(2, "Fail to map Webhook settings: %v", err) + } else if err = Cfg.Section("release.attachment").MapTo(&Release.Attachment); err != nil { + log.Fatal(2, "Fail to map Release.Attachment settings: %v", err) } else if err = Cfg.Section("markdown").MapTo(&Markdown); err != nil { log.Fatal(2, "Fail to map Markdown settings: %v", err) } else if err = Cfg.Section("smartypants").MapTo(&Smartypants); err != nil { |