appdash icon indicating copy to clipboard operation
appdash copied to clipboard

Use t.Cleanup instead of defer in Golang code tests

Open sourcegraph-bot opened this issue 4 years ago • 0 comments

Using a proper defined cleanup function like

t.Cleanup(func () {
  // do sth
})

is more explicit than just

defer func () {
  // do sth
}

so let's use that approach.

sourcegraph-bot avatar Apr 28 '20 16:04 sourcegraph-bot