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

replace strings.Title to cases.Title #2650

Merged
merged 1 commit into from Dec 1, 2022
Merged

Conversation

EinfachePhy
Copy link
Contributor

strings.Title is Deprecated, because the rule Title uses for word boundaries does not handle Unicode

Copy link
Contributor

@kevwan kevwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@kevwan kevwan merged commit 10fd913 into zeromicro:master Dec 1, 2022
@waltcow
Copy link

waltcow commented Dec 12, 2022

NGTM, All code generate with new goctl can not match with the old generated code in method name

func TestString_Camel(t *testing.T) {
	ret := From("ThisCamel").ToCamel()
	assert.Equal(t, "ThisCamel", ret)
}

=== RUN TestString_Camel
string_test.go:46:
Error Trace: /tools/goctl/util/stringx/string_test.go:46
Error: Not equal:
expected: "ThisCamel"
actual : "Thiscamel"

    	            	Diff:
    	            	--- Expected
    	            	+++ Actual
    	            	@@ -1 +1 @@
    	            	-ThisCamel
    	            	+Thiscamel
    	Test:       	TestString_Camel

--- FAIL: TestString_Camel (0.00s)

Expected :ThisCamel
Actual :Thiscamel

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.

None yet

3 participants