-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
symlink: drop go 1.13, and use testing.Cleanup() #55
Conversation
relates to #54 (comment) /cc @kolyshkin |
@@ -53,8 +53,8 @@ func testSymlink(tmpdir, path, expected, scope string) error { | |||
} | |||
|
|||
func TestFollowSymlinkAbsolute(t *testing.T) { | |||
tmpdir, cleanup := mkTempDir(t) | |||
defer cleanup() | |||
tmpdir := mkTempDir(t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we use t.TempDir()
here? https://golang.org/pkg/testing/#T.TempDir
Ahh, this is because they are only supported since 1.15, so we need to wait at least until 1.14 is no longer supported.
Makes sense to add a TODO maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes, can add a TODO
(didn't know about the t.TempDir()
until you mentioned it recently. I should catch up more on new features 😂)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't use this shiny new t.TempDir() anyway until 1.14 goes out of fashion...
Cleanup was added in Go 1.14, so we need to drop go 1.13 for this. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
b26c51b
to
f59b804
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except for a missing TODO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@cpuguy83 PTAL |
1 similar comment
@cpuguy83 PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Cleanup was added in Go 1.14, so we need to drop go 1.13 for this.