Skip to content
This repository was archived by the owner on Oct 29, 2021. It is now read-only.

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

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

Use t.Cleanup instead of defer in Golang code tests#213
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants