mirror of
https://github.com/astaxie/beego.git
synced 2025-07-01 05:00:18 +00:00
Support Parse Bool with more diffrent values
ParseBool returns the boolean value represented by the string. It accepts 1, 1.0, t, T, TRUE, true, True, YES, yes, Yes,Y, y, ON, on, On, 0, 0.0, f, F, FALSE, false, False, NO, no, No, N,n, OFF, off, Off. Any other value returns an error.
This commit is contained in:
@ -82,7 +82,7 @@ func (c *fakeConfigContainer) DefaultInt64(key string, defaultval int64) int64 {
|
||||
}
|
||||
|
||||
func (c *fakeConfigContainer) Bool(key string) (bool, error) {
|
||||
return strconv.ParseBool(c.getData(key))
|
||||
return ParseBool(c.getData(key))
|
||||
}
|
||||
|
||||
func (c *fakeConfigContainer) DefaultBool(key string, defaultval bool) bool {
|
||||
|
Reference in New Issue
Block a user