mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-23 23:16:49 +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()
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ func TestDatabaseConnect(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
config *database.Config
|
||||
closer func(dbConn *database.Db) error
|
||||
closer func(dbConn *database.Instance) error
|
||||
output interface{}
|
||||
}{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user