mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 09:40:56 +00:00
go vet
This commit is contained in:
parent
b2a06c5fa0
commit
9c7d95b071
@ -122,12 +122,11 @@ type ConfigContainer struct {
|
||||
|
||||
// Bool returns the boolean value for a given key.
|
||||
func (c *ConfigContainer) Bool(key string) (bool, error) {
|
||||
|
||||
if v, err := c.getData(key); err != nil {
|
||||
v, err := c.getData(key)
|
||||
if err != nil {
|
||||
return false, err
|
||||
} else {
|
||||
return config.ParseBool(v)
|
||||
}
|
||||
return config.ParseBool(v)
|
||||
}
|
||||
|
||||
// DefaultBool return the bool value if has no error
|
||||
|
Loading…
Reference in New Issue
Block a user