Panic on err when connecting to db
This commit is contained in:
parent
f67f6ff0d8
commit
56485b8deb
@ -5,7 +5,6 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
"log"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -31,7 +30,7 @@ var cfg = config.Config{ //nolint:gochecknoglobals
|
|||||||
func init() { //nolint:gochecknoinits
|
func init() { //nolint:gochecknoinits
|
||||||
_, err := postgres.Connect("pgx", cfg.DatabaseConnection)
|
_, err := postgres.Connect("pgx", cfg.DatabaseConnection)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("failed connecting to DB for migrations: %v", err)
|
panic("failed connecting to DB for migrations: " + err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
txdb.Register("pgtx", "pgx", cfg.DatabaseConnection)
|
txdb.Register("pgtx", "pgx", cfg.DatabaseConnection)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user