mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 15:10:55 +00:00
fix yaml
This commit is contained in:
parent
f2b4c29f83
commit
dee542df42
@ -80,8 +80,8 @@ func (c *YAMLConfigContainer) Bool(key string) (bool, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *YAMLConfigContainer) Int(key string) (int, error) {
|
func (c *YAMLConfigContainer) Int(key string) (int, error) {
|
||||||
if v, ok := c.data[key].(int); ok {
|
if v, ok := c.data[key].(int64); ok {
|
||||||
return v, nil
|
return int(v), nil
|
||||||
}
|
}
|
||||||
return 0, errors.New("not int value")
|
return 0, errors.New("not int value")
|
||||||
}
|
}
|
||||||
|
@ -6,12 +6,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var yamlcontext = `
|
var yamlcontext = `
|
||||||
"appname": "beeapi",
|
"appname": beeapi
|
||||||
"httpport": 8080,
|
"httpport": 8080
|
||||||
"mysqlport": 3600,
|
"mysqlport": 3600
|
||||||
"PI": 3.1415976,
|
"PI": 3.1415976
|
||||||
"runmode": "dev",
|
"runmode": dev
|
||||||
"autorender": false,
|
"autorender": false
|
||||||
"copyrequestbody": true
|
"copyrequestbody": true
|
||||||
`
|
`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user