数据库读写操作主从配置都是一个数据库是不是有问题哇?
Opened this issue · 0 comments
Chen-Litao commented
pathRead := strings.Join([]string{conf.DbUser, ":", conf.DbPassWord, "@tcp(", conf.DbHost, ":", conf.DbPort, ")/", conf.DbName, "?charset=utf8&parseTime=true"}, "")
pathWrite := strings.Join([]string{conf.DbUser, ":", conf.DbPassWord, "@tcp(", conf.DbHost, ":", conf.DbPort, ")/", conf.DbName, "?charset=utf8&parseTime=true"}, "")
repository/db/dao/init.go中的InitMySQL