package models

import (
	"database/sql"

	_ "github.com/lib/pq"
)

var x *sql.DB

// NewDB - db object
func NewDB() (*sql.DB, error) {
	var err error
	x, err = sql.Open("postgres", "user=postgres host=localhost sslmode=disable dbname=gallery")
	return x, err
}
