Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
database/sql: Stmt.Close discards error #12798
The Stmt.Close() function in database/sql discards any error generated by the Close() function of the contained driverStmt. I think this error should be propagated.
This is preventing github.com/DATA-DOG/go-sqlmock/ExpectedPrepare.WillReturnCloseError from functioning:
This change is causing breakage on tip: golang/go#12798 I think it's a reasonable upstream change. Looking at the commit that added the code that is failing on our side the lack of error propagation is called out and is the reason we're now failing. 72f8451 This change attempts to preserve old behavior while supporting the fact that errors are now propagated properly by Stmt.Close(). Open to better ways to do this though.