psql connection
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user