diff --git a/postgresql.go b/postgresql.go index 56bb30d..7133c6a 100644 --- a/postgresql.go +++ b/postgresql.go @@ -15,13 +15,15 @@ var ( sqlxClient *sqlx.DB ) -// Connect to postgres database +// Connect to postgresql database func Connect(host, user, password, dbname, port, sslmode string) error { // Connect string dsn := fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%s sslmode=%s TimeZone=UTC", host, user, password, dbname, port, sslmode, ) + // TODO: write case for SSL mode + db, err := sqlx.Connect("postgres", dsn) if err != nil { log.Fatalln(err)