-
Notifications
You must be signed in to change notification settings - Fork 409
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
[Feature] Add new string template functions #705
Conversation
list of funcs: - lower - upper - title - camelcase - snakecase - kebabcase - firstLower - firstUpper change the dependency for strings ops "iancoleman/strcase" -> "huandu/xstrings"
@LandonTClipp please review the PR, cuz I can't edit Reviewers section. |
pkg/outputter.go
Outdated
InterfaceNameCamel: xstrings.ToCamelCase(iface.Name), | ||
InterfaceNameLowerCamel: xstrings.FirstRuneToLower(xstrings.ToCamelCase(iface.Name)), | ||
InterfaceNameSnake: xstrings.ToSnakeCase(iface.Name), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this have any behavior differences or are they strictly equivalent? I'm inclined to keep the old package populating these variables and just remove them in v3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as far as I see, they behave absolutely the same.
But since they are deprecated I guess it's okay to keep code unchanged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #705 +/- ##
===================================================
- Coverage 74.89121% 74.88090% -0.01032%
===================================================
Files 9 9
Lines 2298 2309 +11
===================================================
+ Hits 1721 1729 +8
- Misses 440 442 +2
- Partials 137 138 +1
☔ View full report in Codecov by Sentry. |
add deprecation comment
b77a56a
to
8b0b6a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
List of new funcs:
change the dependency for strings ops "iancoleman/strcase" -> "huandu/xstrings"
deprecate the custom "InterfaceName" template variables
Description
Type of change
Version of Golang used when building/testing:
How Has This Been Tested?
Unit tests. Build and run mockery with new functions applied to a template locally.
Checklist