// Connect makes a postgres connection
Connect makes a postgres connection
// Connect makes a postgres connection
func Connect(dbURL string) *Db {
	conn, dbErr := sql.Open("postgres", dbURL)
	if dbErr != nil {
		log.Panic(dbErr)
	}
	err := conn.Ping()
	if err != nil {
		log.Panic(err)
	}
	log.Info("postgres connection succesful")
	return &Db{
		conn: conn,
	}
}
func Connect ( dbURL string ) * Db { conn , dbErr := sql . Open ( " " , dbURL ) if dbErr != nil { log . Panic ( dbErr ) } err := conn . Ping ( ) if err != nil { log . Panic ( err ) } log . Info ( " " ) return & Db { conn : conn , } }
Connect makes a postgres connection
Connect makes a postgres connection
// open database