表初始化位置调整至mysql

This commit is contained in:
suguo.yao 2022-12-19 11:28:02 +08:00
parent 747da175d7
commit 1ba9b3ab0a
2 changed files with 14 additions and 2 deletions

View File

@ -21,6 +21,7 @@ type Config struct {
ConnMaxLifetime int64 //ConnMaxLifetime 最大连接时间,单位:小时
MaxIdleConns int
MaxOpenConns int
InitTable bool
}
// Init mysql初始化

11
mysql/tables-mysql.go Normal file
View File

@ -0,0 +1,11 @@
package mysql
func InitTable() error {
//不初始化表时返回
if !_conf.InitTable {
return nil
}
//成功初始化后返回
return nil
}