We can clean up the tests a bit by starting to use testing.T.TempDir instead of having this in ~20 tests:
|
tmpdir, err := ioutil.TempDir("", "git-repo") |
|
if err != nil { |
|
log.Fatal(err) |
|
} |
|
defer func(dir string) { |
|
os.RemoveAll(dir) |
|
}(tmpdir) |
I would normally just have sent a PR, but testing.T.TempDir was introduced in Go 1.15 and I don't know whether it would be okay to require that compiler version given that go.mod states 1.12 and that .github/workflows/go.yml uses Go 1.14 on Mac OS X. Is there any particular reason Mac OS X builds use an older version than what's tested on Linux?
We can clean up the tests a bit by starting to use testing.T.TempDir instead of having this in ~20 tests:
git-repo-go/manifest/manifest_test.go
Lines 513 to 519 in 8d46bab
I would normally just have sent a PR, but testing.T.TempDir was introduced in Go 1.15 and I don't know whether it would be okay to require that compiler version given that go.mod states 1.12 and that .github/workflows/go.yml uses Go 1.14 on Mac OS X. Is there any particular reason Mac OS X builds use an older version than what's tested on Linux?