Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
dee542df
authored
2013-08-22 13:46:22 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix yaml
1 parent
f2b4c29f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
config/yaml.go
config/yaml_test.go
config/yaml.go
View file @
dee542d
...
...
@@ -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
]
.
(
int
64
);
ok
{
return
int
(
v
)
,
nil
}
return
0
,
errors
.
New
(
"not int value"
)
}
...
...
config/yaml_test.go
View file @
dee542d
...
...
@@ -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
`
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment