@ -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 ( "," )