Categorygithub.com/sicuni/go-generate
repositorypackage
1.0.0
Repository: https://github.com/sicuni/go-generate.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# README

go-generate

安装:

go get github.com/sicuni/go-generate

自动生成model、dao代码

使用说明:

        gen := go_generate.New(config.New(
		config.WithModelPath("./"), //model 代码输出路径
		config.WithDaoPath("./"),   //dao 代码输出路径
	))
	gen.UseDB(database.OpenGorm(database.MYSQL, MysqlConnectstring)) //使用gorm mysql
	gen.BindModel(gen.GenModelAs("user", "User"))             //绑定模型
	if err := gen.Execute(); err != nil {
		fmt.Println(err)
	}