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:
7
beego.go
7
beego.go
@ -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
|
||||
|
Reference in New Issue
Block a user