You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But on closer inspection the return type of this func is a *go-mssqldb.Connector not a driver.Connector interface meaning it does not actually implement the interface.
Changing the return type would fix this, but it would mean anyone relying on the concrete type being returned would need to be updated. Thankfully the failure mode for this is a compilation failure so should be fairly easy to detect and fix either by adding an appropriate cast or NewConnector could be used instead.
The text was updated successfully, but these errors were encountered:
As per the docs at https://pkg.go.dev/database/sql/driver "Drivers should implement Connector and DriverContext interfaces."
At a quick glance you'd think this driver implements
driver.DriverContext
due to this method:go-mssqldb/mssql.go
Line 67 in dad23d2
But on closer inspection the return type of this func is a
*go-mssqldb.Connector
not adriver.Connector
interface meaning it does not actually implement the interface.Changing the return type would fix this, but it would mean anyone relying on the concrete type being returned would need to be updated. Thankfully the failure mode for this is a compilation failure so should be fairly easy to detect and fix either by adding an appropriate cast or
NewConnector
could be used instead.The text was updated successfully, but these errors were encountered: