Skip to content

Use t.Cleanup instead of defer in Golang code tests#36

Open
sourcegraph-bot wants to merge 1 commit into
masterfrom
sourcegraph/t-cleanup
Open

Use t.Cleanup instead of defer in Golang code tests#36
sourcegraph-bot wants to merge 1 commit into
masterfrom
sourcegraph/t-cleanup

Conversation

@sourcegraph-bot

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants