99designs / gqlgen

go generate based graphql server library
https://gqlgen.com
MIT License
9.9k stars 1.15k forks source link

Handle common initialisms as the non-first word #3302

Closed noamcohen97 closed 1 week ago

noamcohen97 commented 1 week ago

If a common initialisms was the prefix of the second word (or any word other the first one) of an identifier, it was treated as initialism even though the next rune was uppercase. e.g. "USER_IDENTITY".

This PR should resolve this issue

I have:

coveralls commented 1 week ago

Coverage Status

coverage: 58.869%. remained the same when pulling bbe0df84a485ad03a7faf8ce6526c0dfb4496a09 on noamcohen97:fix_initialisms_bug into a711ecbab685a1ad96e32e42c400cf493d4f0062 on 99designs:master.

StevenACoffman commented 1 week ago

Thanks! I really appreciate the clarification in the comments and renaming of variables.