-
Notifications
You must be signed in to change notification settings - Fork 110
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
ToCamel fails if input is uppercase #39
Comments
+1 |
|
Just tested and this works with the now current version. This ticket can be closed. |
This change just broke things for us. The bel package (to generate TypeScript definitions from go types uses ToCamelCase by default for type names. So far this worked nicely for types named e.g. SMSMessage, but those now get converted to Smsmessage which is not quite what we want (and broke the build of our app). I can probably work around it, but just wanted to note that those kind of hidden behaviour changes in a minor package update can and do have unexpected consequences and side effects. A better solution would have been to add a new function for the new behaviour. |
If you run
ToCamel("PINEAPPLE")
I would expect the output to be"Pineapple"
. Unexpectedly"PINEAPPLE" is returned. As a workaround you can do
strcase.ToCamel(strings.ToLower(str)), but it would be nice if
ToCamel` did the right thing directly.The text was updated successfully, but these errors were encountered: