fix yaml
Showing
2 changed files
with
8 additions
and
8 deletions
| ... | @@ -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 | ... | ... |
-
Please register or sign in to post a comment