前置更新

前置更新
This commit is contained in:
xiexiaojun
2019-05-24 21:25:26 +08:00
parent 12b5a73d6e
commit fae35b9107
10 changed files with 453 additions and 26 deletions

View File

@@ -5,7 +5,9 @@ import "fmt"
//
type Config struct {
CfgBase
MySQLInfo MysqlDbInfo `toml:"mysql_info"`
MySQLInfo MysqlDbInfo `toml:"mysql_info"`
OutDir string `toml:"out_dir"`
SingularTable bool `toml:"singular_table"`
}
//mysql 数据库信息
@@ -37,3 +39,23 @@ func GetMysqlConStr() string {
_map.MySQLInfo.Database,
)
}
//设置输出目录
func SetOutDir(outDir string) {
_map.OutDir = outDir
}
//获取输出目录
func GetOutDir() string {
return _map.OutDir
}
//设置禁用表名复数
func SetSingularTable(b bool) {
_map.SingularTable = b
}
//获取禁用表名复数
func GetSingularTable() bool {
return _map.SingularTable
}