Skip to content

Instantly share code, notes, and snippets.

@clairew
Last active August 9, 2018 23:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clairew/a1b6bb164120bb36437f628274ccc608 to your computer and use it in GitHub Desktop.
Save clairew/a1b6bb164120bb36437f628274ccc608 to your computer and use it in GitHub Desktop.
Go Test Runner Example
func TestMain(m *testing.M) {
TestSetup() // logic to set up necessary work before running test suite
exitCode := m.Run() // run the tests and keep track of exit code
TestTearDown(exitCode) // teardown logic
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment