From 460a1f56174bc0b00b263b18db429b17547af4a0 Mon Sep 17 00:00:00 2001 From: Romain Dartigues Date: Wed, 15 May 2024 14:01:19 +0200 Subject: [PATCH] go vet: struct literal uses unkeyed fields --- connectors/databases/client/mssql/mssql_connector.go | 2 +- connectors/databases/client/mysql/mysql_connector.go | 2 +- connectors/databases/client/postgresql/postgresql_connector.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/connectors/databases/client/mssql/mssql_connector.go b/connectors/databases/client/mssql/mssql_connector.go index c53c0a2..3f6d3fe 100644 --- a/connectors/databases/client/mssql/mssql_connector.go +++ b/connectors/databases/client/mssql/mssql_connector.go @@ -52,7 +52,7 @@ func (c MssqlConnector) Load(schema interface{}) (interface{}, error) { if err != nil { return db, err } - return &dbtype.MssqlDB{db}, nil + return &dbtype.MssqlDB{DB: db}, nil } func (c MssqlConnector) Schema() interface{} { return c.rawConn.Schema() diff --git a/connectors/databases/client/mysql/mysql_connector.go b/connectors/databases/client/mysql/mysql_connector.go index 38f1ec9..10304f7 100644 --- a/connectors/databases/client/mysql/mysql_connector.go +++ b/connectors/databases/client/mysql/mysql_connector.go @@ -80,7 +80,7 @@ func (c MysqlConnector) Load(schema interface{}) (interface{}, error) { if err != nil { return db, err } - return &dbtype.MysqlDB{db}, nil + return &dbtype.MysqlDB{DB: db}, nil } func (c MysqlConnector) Schema() interface{} { return c.mysqlRawConn.Schema() diff --git a/connectors/databases/client/postgresql/postgresql_connector.go b/connectors/databases/client/postgresql/postgresql_connector.go index c8ba7c7..fd16536 100644 --- a/connectors/databases/client/postgresql/postgresql_connector.go +++ b/connectors/databases/client/postgresql/postgresql_connector.go @@ -52,7 +52,7 @@ func (c PostgresqlConnector) Load(schema interface{}) (interface{}, error) { if err != nil { return db, err } - return &dbtype.PostgresqlDB{db}, nil + return &dbtype.PostgresqlDB{DB: db}, nil } func (c PostgresqlConnector) Schema() interface{} { return c.rawConn.Schema()