1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-15 04:41:01 +00:00

fix multipart & add three useful function

c.GetString()
c. GetInt()
c.GetBool()
This commit is contained in:
astaxie
2013-04-09 21:49:17 +08:00
parent 4353c98fd0
commit f9e8b4f124
2 changed files with 25 additions and 1 deletions

View File

@ -35,6 +35,7 @@ var (
SessionGCMaxLifetime int64 // session's gc maxlifetime
SessionSavePath string // session savepath if use mysql/redis/file this set to the connectinfo
UseFcgi bool
MaxMemory int64
GlobalSessions *session.Manager //GlobalSessions
)
@ -62,6 +63,7 @@ func init() {
SessionGCMaxLifetime = 3600
SessionSavePath = ""
UseFcgi = false
MaxMemory = 1 << 26 //64MB
} else {
HttpAddr = AppConfig.String("httpaddr")
if v, err := AppConfig.Int("httpport"); err != nil {
@ -69,6 +71,11 @@ func init() {
} else {
HttpPort = v
}
if v, err := AppConfig.Int64("maxmemory"); err != nil {
MaxMemory = 1 << 26
} else {
MaxMemory = v
}
AppName = AppConfig.String("appname")
if runmode := AppConfig.String("runmode"); runmode != "" {
RunMode = runmode