adding require for main only
This commit is contained in:
parent
527794ea76
commit
6af9a26717
|
|
@ -18,7 +18,7 @@ type infraManager struct {
|
|||
}
|
||||
|
||||
func (im *infraManager) openConn() error {
|
||||
dsn := fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%s TimeZone=Asia/Shanghai",
|
||||
dsn := fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%s sslmode=require TimeZone=Asia/Shanghai",
|
||||
im.cfg.DBHost, im.cfg.DBUser, im.cfg.DBPass, im.cfg.DBName, im.cfg.DBPort)
|
||||
db, err := gorm.Open(postgres.Open(dsn), &gorm.Config{})
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in New Issue