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

fix: FSET lowercasing upper case fields #742

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

iwpnd
Copy link
Contributor

@iwpnd iwpnd commented May 25, 2024

Please ensure you adhere to every item in this list

Figured it is minor enough to not wait your okay on this @tidwall . 🙏

  • This PR was pre-approved by the project maintainer
  • I have self-reviewed the code
  • I have added all necessary tests

Describe your changes

moving the string.ToLower() conversion into the switch statement instead of mutating the input argument ensures field cases are preserved. added additional tests.

[...]
	for i := 3; i < len(args); i++ {
		arg := args[i]
		switch strings.ToLower(arg) {
		case "xx":
			xx = true
		default:
			fkey := arg
			i++
                        [...]

Issue number and link

fixes #741

@iwpnd
Copy link
Contributor Author

iwpnd commented May 25, 2024

An unrelated test appears to be failing. Looks to be flaky 👀

@tidwall tidwall merged commit 0787085 into tidwall:master Jun 4, 2024
1 check failed
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.

FSET transforms field names to lowercase
2 participants