Panic on err when connecting to db
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user