Skip to content

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

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

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

Conversation

@sourcegraph-bot
Copy link

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants