-
Notifications
You must be signed in to change notification settings - Fork 67
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
Support darwin clonefile #223
Support darwin clonefile #223
Conversation
Signed-off-by: Derek McGowan <derek@mcg.dev>
|
||
package fs | ||
|
||
var copyFile = openAndCopyFile |
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.
I'm not wild about a var
here vs func copyFile(target, source string) error { return openAndCopyFile(target, source) }
but since it's private it's a very minor concern.
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.
Yeah me either, it just seemed cleaner though. If there is an argument to be made that var is slower, then will update.
fs/copy_darwin.go
Outdated
@@ -0,0 +1,38 @@ | |||
//go:build darwin || freebsd || openbsd || netbsd || solaris | |||
// +build darwin freebsd openbsd netbsd solaris |
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.
Seems wrong
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.
oh yeah, those must have been ignored anyway, removed
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.
Build tags seem wrong, LGTM other than that
Signed-off-by: Derek McGowan <derek@mcg.dev>
Let's release v0.4.0 after merging this |
31c4d57
to
30cf84d
Compare
Nice! This makes |
Adds clonefile support on copy for Darwin.
Added benchmark to show it is working