Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove duplicate error check in db.go #69

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
remove duplicate error check in db.go
  • Loading branch information
Coxcopi committed Apr 30, 2024
commit 4c16f28f2f0ee2bcd7e312e06fafbc680bbe2d65
6 changes: 2 additions & 4 deletions dbl/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"database/sql"
"errors"
"fmt"
_ "github.com/lib/pq"
"time"

_ "github.com/lib/pq"
)

type DAO struct {
Expand All @@ -27,9 +28,6 @@ func Init(dbHost string, dbPort int, dbName, dbUser, dbPassword string) (DAO, er
if err != nil {
return dao, err
}
if err != nil {
return dao, err
}
if err := db.Ping(); err != nil {
return dao, errors.New(fmt.Sprintf("Unable to ping the database: %s:%d\n", dbHost, dbPort))
}
Expand Down
Loading