Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/dlv, pkg/proc: use T.TempDir in tests for temp dirs #3256

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

alexandear
Copy link
Contributor

@alexandear alexandear commented Jan 24, 2023

This PR simplifies tests in cmd/dlv and pkg/proc by replacing usages of ioutil.TempDir with t.TempDir.

T.TempDir automatically removes the temporary directory at the end of a test. So, no need to manually call defer os.RemoveAll(tmpDir)

@alexandear alexandear changed the title cmd/dlv: use T.TempDir in tests for temp dirs cmd/dlv, pkg/proc: use T.TempDir in tests for temp dirs Jan 24, 2023
@alexandear alexandear marked this pull request as ready for review January 24, 2023 20:18
Copy link
Member

@aarzilli aarzilli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@derekparker derekparker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@derekparker derekparker merged commit 64a9024 into go-delve:master Jan 30, 2023
@alexandear alexandear deleted the cmd-dlv-t-temp-dir branch January 31, 2023 09:59
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.

3 participants