unix-conf/.emacs.d/elpa/yasnippet-20160131.948/snippets/go-mode/testmain

21 lines
234 B
Plaintext
Raw Normal View History

2016-02-18 13:53:30 +00:00
# -*- mode: snippet -*-
# name: testmain
# key: testmain
# contributor : @atotto
# --
func TestMain(m *testing.M) {
setup()
ret := m.Run()
if ret == 0 {
teardown()
}
os.Exit(ret)
}
func setup() {
$1
}
func teardown() {
$2
}