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

修改生成的model struct名称为驼峰 #16

Open
pysc opened this issue Jul 8, 2022 · 3 comments
Open

修改生成的model struct名称为驼峰 #16

pysc opened this issue Jul 8, 2022 · 3 comments

Comments

@pysc
Copy link

pysc commented Jul 8, 2022

修改 A_b_c 为 ABC

@pysc
Copy link
Author

pysc commented Jul 8, 2022

#15

@LeftH0ok
Copy link

func main() {
t2t := converter.NewTable2Struct()

t2t.Config(&converter.T2tConfig{
	StructNameToHump: true,   **// 这里配置一下即可**
})

err := t2t.
	SavePath("C:\\Users\\admin\\Desktop\\1.go").
	Dsn("root:root@tcp(localhost:3306)/test?charset=utf8").
	Run()
fmt.Println(err)

}

@Evil-king
Copy link

楼主 你这个修复 还没合并到master中去么 我用最新的go get github.com/gohouse/converter 没有StructNameToHump这个字段

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

3 participants