Skip to content

Commit

Permalink
fix: Handled missing database error
Browse files Browse the repository at this point in the history
  • Loading branch information
zekiahmetbayar committed Jan 12, 2024
1 parent 36af4c4 commit 6bcff14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/database/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package database

import (
"fmt"
"log"
"os"

"gorm.io/driver/postgres"
Expand All @@ -23,6 +24,7 @@ func initializePostgres() *gorm.DB {
Logger: logger.Default.LogMode(logger.Silent),
})
if err != nil {
log.Fatalf("plase set valid credentials for database connection")
return nil
}

Expand Down

0 comments on commit 6bcff14

Please sign in to comment.