ini icon indicating copy to clipboard operation
ini copied to clipboard

Allow for lower case [default] section

Open BernhardLenz opened this issue 3 years ago • 0 comments

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.

BernhardLenz avatar Apr 02 '21 18:04 BernhardLenz