testing: env: refactor SetEnvs
kamilsk opened this issue · comments
Setenv will be available at go 1.17: https://tip.golang.org/pkg/testing/#T.Setenv
Lines 46 to 48 in d8517c0
also, T.Cleanup
is present, so I can extend for example testing.SetEnv
to use it, see golang/mock@6d816de