* 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
* 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>
* fixed mutliline value handling
* added debug messages
* modified regex to allow empty string after indent
* multiline value indentation is determined by first indented value line
* fixed Python-style multiline value support
* fixed it
* fixed it
* cleaned up debug code
* fixed imported package name for new test file
* reversed change
* fixed import
* made changes as requested by github reviewer
* fixed build error
* added test case for large values
* incorporated second round of comments
* fixed import to point to original repo
* made Debug option a function to allow custom implementation
made other changes as requested
* removed bogus import (added by GoLand)
* simplified debug function args
* made changes as requested
* fixed format error
* made requested changes
Co-authored-by: Joerg Reichelt <joreiche@cisco.com>
Edge case has a value that contains an inline symbol such as `;` or `#`.
Currently parsing a value such as:
```
value = val#ue
```
would result into just `val` if `IgnoreInlineComment` is false.
If `IgnoreInlineComment` is true it would result into the full value, but it's incorrect to depend on this.
With the fix value would be parsed as `val#ue`.
The default git config format is equivalent to PrettyFormat w/o
alignment (i.e. just spaces around '=') and SaveToIndent(..., "\t")
This patch allows for setting PrettyFormat=false and PrettySpaces=True
to achieve the same output as the git config default.
It is backwards compatible in that current use case output will not be
affected unless you specifically disable PrettyFormat AND enable
PrettySpaces.