Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for lower case [default] section #287

Open
BernhardLenz opened this issue Apr 2, 2021 · 0 comments
Open

Allow for lower case [default] section #287

BernhardLenz opened this issue Apr 2, 2021 · 0 comments

Comments

@BernhardLenz
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant