mirror of
https://github.com/astaxie/beego.git
synced 2025-07-01 05:10:17 +00:00
add Strings interface can return []string sep by ;
Example: peers = one;Two;Three
This commit is contained in:
@ -25,6 +25,10 @@ func (c *fakeConfigContainer) String(key string) string {
|
||||
return c.getData(key)
|
||||
}
|
||||
|
||||
func (c *fakeConfigContainer) Strings(key string) []string {
|
||||
return strings.Split(c.getData(key), ";")
|
||||
}
|
||||
|
||||
func (c *fakeConfigContainer) Int(key string) (int, error) {
|
||||
return strconv.Atoi(c.getData(key))
|
||||
}
|
||||
|
Reference in New Issue
Block a user