diff options
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r-- | modules/setting/setting.go | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 4bd77ca6a1..10cb2b2a21 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -159,20 +159,6 @@ var ( SessionConfig session.Options CSRFCookieName = "_csrf" - // Git settings - Git struct { - MaxGitDiffLines int - MaxGitDiffLineCharacters int - MaxGitDiffFiles int - GcArgs []string `delim:" "` - Timeout struct { - Migrate int - Mirror int - Clone int - Pull int - } `ini:"git.timeout"` - } - // Cron tasks Cron struct { UpdateMirror struct { @@ -194,6 +180,25 @@ var ( } `ini:"cron.check_repo_stats"` } + // Git settings + Git struct { + MaxGitDiffLines int + MaxGitDiffLineCharacters int + MaxGitDiffFiles int + GcArgs []string `delim:" "` + Timeout struct { + Migrate int + Mirror int + Clone int + Pull int + } `ini:"git.timeout"` + } + + // API settings + API struct { + MaxResponseItems int + } + // I18n settings Langs, Names []string dateLangs map[string]string @@ -465,10 +470,12 @@ func NewContext() { if err = Cfg.Section("markdown").MapTo(&Markdown); err != nil { log.Fatal(4, "Fail to map Markdown settings: %v", err) - } else if err = Cfg.Section("git").MapTo(&Git); err != nil { - log.Fatal(4, "Fail to map Git settings: %v", err) } else if err = Cfg.Section("cron").MapTo(&Cron); err != nil { log.Fatal(4, "Fail to map Cron settings: %v", err) + } else if err = Cfg.Section("git").MapTo(&Git); err != nil { + log.Fatal(4, "Fail to map Git settings: %v", err) + } else if err = Cfg.Section("api").MapTo(&API); err != nil { + log.Fatal(4, "Fail to map API settings: %v", err) } Langs = Cfg.Section("i18n").Key("LANGS").Strings(",") |