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

fs: Replace os.Setenv() usage in testing with (testing.T).Setenv() #45

Merged
merged 3 commits into from
Nov 30, 2021

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Nov 30, 2021

Reference: https://pkg.go.dev/testing#T.Setenv

Added in Go 1.17. It will automatically reset the environment variable after each test.

Reference: https://pkg.go.dev/testing#T.Setenv

Added in Go 1.17. It will automatically reset the environment variable after each test.
@bflad bflad added the testing label Nov 30, 2021
Copy link
Member

@radeksimko radeksimko 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!

@bflad bflad merged commit 7e86c53 into main Nov 30, 2021
@bflad bflad deleted the bflad-testing-T-Setenv branch November 30, 2021 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants