Panic on err when connecting to db
This commit is contained in:
parent
f67f6ff0d8
commit
56485b8deb
@ -5,7 +5,6 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -31,7 +30,7 @@ var cfg = config.Config{ //nolint:gochecknoglobals
|
||||
func init() { //nolint:gochecknoinits
|
||||
_, err := postgres.Connect("pgx", cfg.DatabaseConnection)
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user