-
Notifications
You must be signed in to change notification settings - Fork 66
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
Make PillString case insensitive #21
Comments
Can you show me a sample of what your trying to do? |
type Pill int
const (
Placebo Pill = iota
IDK
) Now, myPill := PillString("idk") I would get an error because |
So I like the feature. I do not yet like my options on how I would implement this. I want to keep things compatible with people relying on case-sensitivity not matter how silly that sounds. I'll see what a patch will look like. Unless someone get there first. |
@livingsilver94 I need more testing on this. But this seems like the cleanest way to pull this together. |
Thank you for implementing it 👍 |
It would be useful to perform string -> enum conversion in a case-insensitive fashion. While I could convert my string to lowercase and have all of my values lowercase as well, some of them are acronyms which looks ugly if not written with capital letters.
The text was updated successfully, but these errors were encountered: