mirror of
https://github.com/xiaoqidun/goini.git
synced 2024-11-22 22:46:47 +08:00
fix key lookup
This commit is contained in:
parent
cec5198500
commit
944b2650ed
4
goini.go
4
goini.go
@ -177,10 +177,6 @@ func (ini *GoINI) GetString(name string, key string, value string) string {
|
|||||||
if 0 == len(name) {
|
if 0 == len(name) {
|
||||||
name = ini.commonField
|
name = ini.commonField
|
||||||
}
|
}
|
||||||
if pos := strings.Index(key, "."); pos != -1 {
|
|
||||||
name = key[:pos]
|
|
||||||
key = key[pos+1:]
|
|
||||||
}
|
|
||||||
if v, ok := ini.dataMap[name]; ok {
|
if v, ok := ini.dataMap[name]; ok {
|
||||||
if vv, ok := v[key]; ok {
|
if vv, ok := v[key]; ok {
|
||||||
return vv
|
return vv
|
||||||
|
Loading…
x
Reference in New Issue
Block a user