修复一个错误拼写

This commit is contained in:
shadow1ng 2021-03-10 14:42:30 +08:00
parent 41ec4489da
commit 66cd740580
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ func PostgresConn(info *common.HostInfo, user string, pass string) (flag bool, e
flag = false
Host, Port, Username, Password := info.Host, common.PORTList["psql"], user, pass
dataSourceName := fmt.Sprintf("postgres://%v:%v@%v:%v/%v?sslmode=%v", Username, Password, Host, Port, "postgres", "disable")
db, err := sql.Open("mysql", dataSourceName)
db, err := sql.Open("postgres", dataSourceName)
if err == nil {
db.SetConnMaxLifetime(time.Duration(info.Timeout) * time.Second)
defer db.Close()