cli / go-gh

A Go module for interacting with gh and the GitHub API from the command line.
https://pkg.go.dev/github.com/cli/go-gh/v2
MIT License
322 stars 45 forks source link

Change tests to use t.Setenv instead of os.Setenv #65

Closed samcoe closed 1 year ago

samcoe commented 1 year ago

Now that we are using go 1.18 we can use t.Setenv to safely set environment variables in tests without worrying about them not getting unset. This PR changes our tests to use this new functionality.