Comment cleanup

This commit is contained in:
Maximilian
2023-08-12 14:28:21 -05:00
parent fa3165d317
commit b36cbf4b9e
2 changed files with 1 additions and 5 deletions

View File

@ -10,18 +10,15 @@ import (
// Connect returns a new database connection
func Connect(app *app.App) *sql.DB {
// Set connection parameters from config
postgresConfig := fmt.Sprintf("host=%s port=%s user=%s "+
"password=%s dbname=%s sslmode=disable",
app.Config.Db.Ip, app.Config.Db.Port, app.Config.Db.User, app.Config.Db.Password, app.Config.Db.Name)
// Create connection
db, err := sql.Open("postgres", postgresConfig)
if err != nil {
panic(err)
}
// Test connection
err = db.Ping()
if err != nil {
panic(err)