1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 19:50:49 +00:00
This commit is contained in:
astaxie 2013-08-22 13:46:22 +08:00
parent f2b4c29f83
commit dee542df42
2 changed files with 8 additions and 8 deletions

View File

@ -80,8 +80,8 @@ func (c *YAMLConfigContainer) Bool(key string) (bool, error) {
}
func (c *YAMLConfigContainer) Int(key string) (int, error) {
if v, ok := c.data[key].(int); ok {
return v, nil
if v, ok := c.data[key].(int64); ok {
return int(v), nil
}
return 0, errors.New("not int value")
}

View File

@ -6,12 +6,12 @@ import (
)
var yamlcontext = `
"appname": "beeapi",
"httpport": 8080,
"mysqlport": 3600,
"PI": 3.1415976,
"runmode": "dev",
"autorender": false,
"appname": beeapi
"httpport": 8080
"mysqlport": 3600
"PI": 3.1415976
"runmode": dev
"autorender": false
"copyrequestbody": true
`