mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 02:20:53 +00:00
config ini module when set section is not exist will panic!
This commit is contained in:
parent
cfcfeb7b99
commit
d0e2c5c67a
@ -162,6 +162,9 @@ func (c *IniConfigContainer) Set(key, value string) error {
|
||||
section = DEFAULT_SECTION
|
||||
k = sectionkey[0]
|
||||
}
|
||||
if _, ok := c.data[section]; !ok {
|
||||
c.data[section] = make(map[string]string)
|
||||
}
|
||||
c.data[section][k] = value
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user