Skip to content

Instantly share code, notes, and snippets.

View dperny's full-sized avatar

Drew Erny dperny

View GitHub Profile
dperny / conditional-defer-wrapper.go
Last active May 3, 2017 19:02
Defer if passing example
func DeferIfPassing(t *testing.T, f func()) {
if t.Failed() {
TestDeferIfPassing(t *testing.T) {
// skip a bit, fill in the blanks
defer DeferIfPassing(t, func() { someCleanUp(with, some, args) })
// ORIGINAL container routes
package container
import (
// none of this is important, it literally ONLY imports things like
// ""
// there are 0 dependencies on the daemon. GOOD DESIGN.

Keybase proof

I hereby claim:

  • I am dperny on github.
  • I am dperny ( on keybase.
  • I have a public key ASB7lDxqcOua5X9ZNN110QafBICjNopLCSLs2qtaac23IQo

To claim this, I am signing this object: