mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-08 23:16:54 +00:00
Bump golangci-lint to v1.24.0, linter fixes and general code improvements (#478)
* Bump golangci-lint version, update Go version deps and generic code improvements * Fix wesbocket resp nil check and zip closures * Update pprof path
This commit is contained in:
@@ -66,7 +66,7 @@ func GetConnectionDetails() *database.Config {
|
||||
}
|
||||
|
||||
// ConnectToDatabase opens connection to database and returns pointer to instance of database.DB
|
||||
func ConnectToDatabase(conn *database.Config) (dbConn *database.Db, err error) {
|
||||
func ConnectToDatabase(conn *database.Config) (dbConn *database.Instance, err error) {
|
||||
database.DB.Config = conn
|
||||
|
||||
if conn.Driver == database.DBPostgreSQL {
|
||||
@@ -87,7 +87,7 @@ func ConnectToDatabase(conn *database.Config) (dbConn *database.Db, err error) {
|
||||
}
|
||||
|
||||
// CloseDatabase closes database connection
|
||||
func CloseDatabase(conn *database.Db) (err error) {
|
||||
func CloseDatabase(conn *database.Instance) (err error) {
|
||||
if conn != nil {
|
||||
return conn.SQL.Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user