Skip to content

Instantly share code, notes, and snippets.

@ncomet
Last active May 2, 2022 12:59
Show Gist options
  • Save ncomet/729610652b759d980f3eaebe63422f07 to your computer and use it in GitHub Desktop.
Save ncomet/729610652b759d980f3eaebe63422f07 to your computer and use it in GitHub Desktop.
TestMain
func TestMain(m *testing.M) {
log.Println("before all package tests")
exitCode := m.Run()
log.Println("after all package tests")
os.Exit(exitCode)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment