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

数据库表字段大写生成的结构体出问题被截断 #10

Open
bensema opened this issue Feb 7, 2021 · 1 comment
Open

数据库表字段大写生成的结构体出问题被截断 #10

bensema opened this issue Feb 7, 2021 · 1 comment

Comments

@bensema
Copy link

bensema commented Feb 7, 2021

表中字段大写导致导出entity后被截断

建议tools里的Capitalize 改为

func (t *Tools) Capitalize(s string) string {
	var upperStr string
	chars := strings.Split(s, "_")
	for _, val := range chars {
		upperStr += strings.ToUpper(val[0:1])+val[1:]
	}
	return upperStr
}
@yezihack
Copy link
Owner

谢谢您的建议,下版本修复此BUG

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

No branches or pull requests

2 participants