Skip to content

Use t.Setenv instead of os.Setenv#6760

Merged
mxpv merged 2 commits intocontainerd:mainfrom
mxpv:env
Apr 1, 2022
Merged

Use t.Setenv instead of os.Setenv#6760
mxpv merged 2 commits intocontainerd:mainfrom
mxpv:env

Conversation

@mxpv
Copy link
Member

@mxpv mxpv commented Apr 1, 2022

Go 1.17 introduced t.Setenv, which automatically restores env changes on test cleanup.
It's quite handy to use instead of os.Setenv which requires to restore env manually. Also this PR adds a few changes to linter's config.

mxpv added 2 commits April 1, 2022 13:53
Signed-off-by: Maksym Pavlenko <[email protected]>
Signed-off-by: Maksym Pavlenko <[email protected]>
@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 1, 2022

Build succeeded.

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