Skip to content

Apply insensitive key name when deleting a key#386

Open
viraatdas wants to merge 1 commit into
go-ini:mainfrom
viraatdas:fix/deletekey-insensitive-340
Open

Apply insensitive key name when deleting a key#386
viraatdas wants to merge 1 commit into
go-ini:mainfrom
viraatdas:fix/deletekey-insensitive-340

Conversation

@viraatdas

Copy link
Copy Markdown

Fixes #340.

Section.DeleteKey did not honour Insensitive/InsensitiveKeys, so a key loaded case-insensitively could not be deleted by a differently-cased name and DeleteKey became a no-op. Lower-case the name the same way the rest of the section does before matching. Added a test that deletes a key under Insensitive: true.

Fixes go-ini#340.

`Section.DeleteKey` did not honour `Insensitive`/`InsensitiveKeys`, so a key loaded case-insensitively could not be deleted by a differently-cased name and `DeleteKey` became a no-op. Lower-case the name the same way the rest of the section does before matching. Added a test that deletes a key under `Insensitive: true`.
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

Successfully merging this pull request may close these issues.

DeleteKey not work

1 participant