symlink: drop go 1.13, and use testing.Cleanup()#55
Merged
cpuguy83 merged 1 commit intomoby:masterfrom Feb 25, 2021
Merged
Conversation
Member
Author
|
relates to #54 (comment) /cc @kolyshkin |
kolyshkin
reviewed
Nov 13, 2020
| func TestFollowSymlinkAbsolute(t *testing.T) { | ||
| tmpdir, cleanup := mkTempDir(t) | ||
| defer cleanup() | ||
| tmpdir := mkTempDir(t) |
Collaborator
There was a problem hiding this comment.
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?
Member
Author
There was a problem hiding this comment.
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 😂)
Collaborator
There was a problem hiding this comment.
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
kolyshkin
requested changes
Nov 18, 2020
Collaborator
kolyshkin
left a comment
There was a problem hiding this comment.
LGTM except for a missing TODO
Collaborator
|
@cpuguy83 PTAL |
1 similar comment
Collaborator
|
@cpuguy83 PTAL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cleanup was added in Go 1.14, so we need to drop go 1.13 for this.