ini
ini copied to clipboard
Allow for lower case [default] section
The aws cli uses a lower case [default] notation for the default section. ini should allow an overwrite of the name of the default section, e.g. through ini.DefaultSection = "default"
To Reproduce Add section [default] to ini file with some random key/value pairs Loop over each key
for _, fileSection := range file.Sections() {
sectionName := fileSection.Name() //sectionName will be DEFAULT even though it is named default in the file
for _, key := range fileSection.Keys() {//no keys available even though the [default] section has entries
Overall though the uppercase lowercase spellings in the ini file need to be preserved though, hence the file cannot be completely converted into lowercase.