Skip to content

Languege/gorm_wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gorm_wrapper

gorm wrapper

自动生成针对gorm的models文件

Usage

go run gen/main.go  -dsn="root:root@tcp(127.0.0.1:3306)/shokudo" \
-db_name="shokudo" \
-out_dir="models"  \
-package="models" \
-table_names="user,user_mail"   #多个表逗号分隔

dsn替换成自己的mysql连接

测试

修改models_test后测试

bash models_test.sh

About

gorm wrapper

Resources

Stars

Watchers

Forks

Packages

No packages published