dee542df by astaxie

fix yaml

1 parent f2b4c29f
...@@ -80,8 +80,8 @@ func (c *YAMLConfigContainer) Bool(key string) (bool, error) { ...@@ -80,8 +80,8 @@ func (c *YAMLConfigContainer) Bool(key string) (bool, error) {
80 } 80 }
81 81
82 func (c *YAMLConfigContainer) Int(key string) (int, error) { 82 func (c *YAMLConfigContainer) Int(key string) (int, error) {
83 if v, ok := c.data[key].(int); ok { 83 if v, ok := c.data[key].(int64); ok {
84 return v, nil 84 return int(v), nil
85 } 85 }
86 return 0, errors.New("not int value") 86 return 0, errors.New("not int value")
87 } 87 }
......
...@@ -6,12 +6,12 @@ import ( ...@@ -6,12 +6,12 @@ import (
6 ) 6 )
7 7
8 var yamlcontext = ` 8 var yamlcontext = `
9 "appname": "beeapi", 9 "appname": beeapi
10 "httpport": 8080, 10 "httpport": 8080
11 "mysqlport": 3600, 11 "mysqlport": 3600
12 "PI": 3.1415976, 12 "PI": 3.1415976
13 "runmode": "dev", 13 "runmode": dev
14 "autorender": false, 14 "autorender": false
15 "copyrequestbody": true 15 "copyrequestbody": true
16 ` 16 `
17 17
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!