psql connection

This commit is contained in:
2023-04-25 17:42:33 +02:00
parent c4fdbbe485
commit 95262a685c
3 changed files with 2 additions and 1 deletions

View File

@@ -30,7 +30,6 @@ func NewPostgresqlStorage(cfg *viper.Viper) (PostgresqlStorage, error) {
fmt.Println("error", err)
return PostgresqlStorage{}, fmt.Errorf("connection to postgresql failed")
}
defer db.Close()
err = db.Ping()
if err != nil {
return PostgresqlStorage{}, fmt.Errorf("connection to postgresql database failed")