mirror of
https://github.com/Alexander-D-Karpov/webring.git
synced 2026-03-16 22:07:41 +03:00
13 lines
195 B
Go
13 lines
195 B
Go
package database
|
|
|
|
import (
|
|
"database/sql"
|
|
_ "github.com/lib/pq"
|
|
"os"
|
|
)
|
|
|
|
func Connect() (*sql.DB, error) {
|
|
connStr := os.Getenv("DB_CONNECTION_STRING")
|
|
return sql.Open("postgres", connStr)
|
|
}
|