Skip to content

Instantly share code, notes, and snippets.

@clairew clairew/example_test.go Secret
Last active Aug 9, 2018

What would you like to do?
Test Tear Down Helper Function Example
//TestDBTearDown closes test db connection
func TestDBTearDown(db *sql.DB) error {
log.Info("Closing connection to test database")
err := db.Close()
if err != nil {
"err": err,
}).Warn("Closing db connection resulted in error")
return err
return nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.