Skip to content

Apply insensitive key name when deleting a key - #386

Merged
unknwon merged 1 commit into
go-ini:v1from
viraatdas:fix/deletekey-insensitive-340
Nov 11, 2026
Merged

unknwon merged 1 commit into
go-ini:v1from
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`.
@unknwon
unknwon merged commit e7d43a3 into go-ini:v1 Nov 11, 2026
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

2 participants