Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sourcegraph-bot
Copy link
Contributor

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants