identity-service/internal/app/database/connect.go

17 lines
251 B
Go
Raw Normal View History

2022-06-19 15:19:05 +02:00
package database
import (
"context"
"github.com/jackc/pgx/v4/pgxpool"
)
func Connect(connStr string) (*pgxpool.Pool, error) {
conn, err := pgxpool.Connect(context.Background(), connStr)
if err != nil {
return nil, err
}
return conn, nil
}