Skip to content

Commit

Permalink
fix: remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Dara Hayes committed Feb 22, 2018
1 parent ea454e4 commit 0565639
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/dao/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ type DatabaseHandler struct {
DB *sql.DB
}

const mobileMetricsTable = "mobileappmetrics"

func (handler *DatabaseHandler) Connect(dbHost, dbUser, dbPassword, dbName, sslMode string) error {
if handler.DB != nil {
return nil
}
//connection logic

connStr := fmt.Sprintf("host=%v user=%v password=%v dbname=%v sslmode=%v", dbHost, dbUser, dbPassword, dbName, sslMode)

// sql.Open doesn't initialize the connection immediately
Expand All @@ -32,7 +34,6 @@ func (handler *DatabaseHandler) Connect(dbHost, dbUser, dbPassword, dbName, sslM
return err
}

// assign db variable declared above
handler.DB = dbInstance
return nil
}
Expand Down

0 comments on commit 0565639

Please sign in to comment.