Skip to content

Fix error message for missing key - #339

Merged
unknwon merged 1 commit into
go-ini:v1from
bewuethr:patch-1
Nov 11, 2026
Merged

unknwon merged 1 commit into
go-ini:v1from
bewuethr:patch-1

Conversation

@bewuethr

Copy link
Copy Markdown

This fixes the grammar in the error message for a missing key: "key %q not exists" to "key %q does not exist"

Link to the issue: n/a

Checklist

  • I agree to follow the Code of Conduct by submitting this pull request.
  • I have read and acknowledge the Contributing guide.
  • I have added test cases to cover the new code.

I didn't add new test cases, but the behaviour is unchanged and tested here already:

ini/section_test.go

Lines 126 to 129 in b2f570e

t.Run("key not exists", func(t *testing.T) {
_, err := f.Section("").GetKey("404")
require.Error(t, err)
})

This test is independent of the error message itself.

@unknwon
unknwon merged commit c8b2058 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.

2 participants