Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
d446b5b0
Commit
d446b5b0
authored
Apr 05, 2015
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve the defaultval
parent
2ba12ad1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
config.go
config.go
+6
-6
No files found.
config.go
View file @
d446b5b0
...
...
@@ -158,7 +158,7 @@ func (b *beegoAppConfig) DefaultString(key string, defaultval string) string {
if
v
!=
""
{
return
v
}
return
b
.
innerConfig
.
DefaultString
(
key
,
defaultval
)
return
defaultval
}
func
(
b
*
beegoAppConfig
)
DefaultStrings
(
key
string
,
defaultval
[]
string
)
[]
string
{
...
...
@@ -166,7 +166,7 @@ func (b *beegoAppConfig) DefaultStrings(key string, defaultval []string) []strin
if
len
(
v
)
!=
0
{
return
v
}
return
b
.
innerConfig
.
DefaultStrings
(
key
,
defaultval
)
return
defaultval
}
func
(
b
*
beegoAppConfig
)
DefaultInt
(
key
string
,
defaultval
int
)
int
{
...
...
@@ -174,7 +174,7 @@ func (b *beegoAppConfig) DefaultInt(key string, defaultval int) int {
if
err
==
nil
{
return
v
}
return
b
.
innerConfig
.
DefaultInt
(
key
,
defaultval
)
return
defaultval
}
func
(
b
*
beegoAppConfig
)
DefaultInt64
(
key
string
,
defaultval
int64
)
int64
{
...
...
@@ -182,7 +182,7 @@ func (b *beegoAppConfig) DefaultInt64(key string, defaultval int64) int64 {
if
err
==
nil
{
return
v
}
return
b
.
innerConfig
.
DefaultInt64
(
key
,
defaultval
)
return
defaultval
}
func
(
b
*
beegoAppConfig
)
DefaultBool
(
key
string
,
defaultval
bool
)
bool
{
...
...
@@ -190,7 +190,7 @@ func (b *beegoAppConfig) DefaultBool(key string, defaultval bool) bool {
if
err
==
nil
{
return
v
}
return
b
.
innerConfig
.
DefaultBool
(
key
,
defaultval
)
return
defaultval
}
func
(
b
*
beegoAppConfig
)
DefaultFloat
(
key
string
,
defaultval
float64
)
float64
{
...
...
@@ -198,7 +198,7 @@ func (b *beegoAppConfig) DefaultFloat(key string, defaultval float64) float64 {
if
err
==
nil
{
return
v
}
return
b
.
innerConfig
.
DefaultFloat
(
key
,
defaultval
)
return
defaultval
}
func
(
b
*
beegoAppConfig
)
DIY
(
key
string
)
(
interface
{},
error
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment