Closed zhsj closed 4 years ago
Given this will no longer use the syscall import, I think it might be better to delete these files/this directory and move the call to sys/unix.Readlink into the sysx
directory (where it is being used from file_posix.go
); I guess you would need to create 2 files there given there is windows support, but maybe a readlink_unix.go and a readlink_windows.go in that directory with the calls to sys/unix and sys/windows respectively. I think this directory was temporary while the syscall itself was implemented for Windows before going upstream.
I read the code again, I find the duplicated Readlink on windows is intentional. So let's close this PR.
Although @darstahl said the fork of Readlink was temporary, but I didn't find upstream commits addressing any bug. So maybe this is still not upstream yet.
use Readlink from golang.org/x/sys/{unix,windows}
syscall_unix.go is also changed because golang.org/x/sys is preferred than syscall package.