3 Commits
Author SHA1 Message Date
aligatorandGitHub 1fc6efb6f2 struct: correctly mapping non unique sections to slice field (#242)
* bugfix: use the value from the correct section when using non unique sections in some special cases

* refactor wording and small fix
2020-05-28 13:00:39 +08:00
aligatorandGitHub faf04e23c2 file: support non-unique sections (#220)
* Support for non unique sections. Enabled with the option AllowNonUniqueSections.

* Non unique section support for MapToStruct

* Non unique section support for section.MapTo

* implement ini.ReflectFrom() for non unique sections

* implement xyz.Section("xyz").ReflectFrom() for non unique sections

* Refactor suggested changes after review

* remove GetSectionCount

* do not initialize sectionList if NonUniqueSections are disabled

* add test for deleting all sections of the same name

* refactor mapAllTo

* refactor ReflectFrom

* fix some comments

* refactoring based on PR suggestions

* update DeleteSectionWithIndex error
2020-03-15 19:21:17 +08:00
8e0f5b3a15 file: customize output delimiter (#226)
* customization output delimiter

* rename KeyValueDelimitersOutput to KeyValueDelimiterOnWrite

* add test for writing with KeyValueDelimiterOnWrite

* bugfix: use '=' as the default delimiter on write

Co-authored-by: Chaliy Roman <cerebrum.ch@gmail.com>
2020-03-07 22:35:44 +08:00