mirror of
https://github.com/xiaoqidun/goini.git
synced 2026-09-03 08:10:22 +08:00
feat(优化代码): 优化配置读写,修复边界问题
This commit is contained in:
2 files changed
+27
-8
No files matched your search
@@ -152,7 +152,7 @@ func (ini *GoINI) SetString(name string, key string, value string) {
|
||||
if index, ok := ini.findSectionKeyLineIndex(name, key); ok {
|
||||
ini.fileLines[index].keyValue = value
|
||||
ini.fileLines[index].modified = true
|
||||
ini.rebuildIndexes()
|
||||
ini.sectionValues[name][key] = value
|
||||
return
|
||||
}
|
||||
ini.ensureSectionLine(name)
|
||||
|
||||
Reference in New Issue
Block a user