Skip to content

Commit

Permalink
Remove usages of t.TempDir() to be compatible with golang 1.14.
Browse files Browse the repository at this point in the history
  • Loading branch information
markusthoemmes committed Sep 17, 2020
1 parent ae5d27f commit 9115d1c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/ignore/ignore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestIgnore_AddIgnoreFiles(t *testing.T) {
}

func TestAddRecursiveGitIgnores(t *testing.T) {
dir, err := ioutil.TempDir(t.TempDir(), "")
dir, err := ioutil.TempDir(os.TempDir(), "")
assert.NoError(t, err)
assert.DirExists(t, dir)
expected := make([]string, 0)
Expand Down
2 changes: 1 addition & 1 deletion pkg/parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func TestParser_ParsePaths(t *testing.T) {
}

func writeToStdin(t *testing.T, text string, f func()) error {
tmpfile, err := ioutil.TempFile(t.TempDir(), "")
tmpfile, err := ioutil.TempFile(os.TempDir(), "")
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/parser/violations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestGenerateFileViolations(t *testing.T) {
// newFile creates a new file for testing. The file, and the directory that the file
// was created in will be removed at the completion of the test
func newFile(t *testing.T, text string) (*os.File, error) {
tmpFile, err := ioutil.TempFile(t.TempDir(), "woke-")
tmpFile, err := ioutil.TempFile(os.TempDir(), "woke-")
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 9115d1c

Please sign in to comment.