Closed adrubesh closed 2 years ago
@jaswdr I made some of the changes you requested, and implemented some additional OS independent pathing. Here is some example output:
GOOS: linux
====Fake Directories====
Directory(2): /officiis/voluptatum
UnixDirectory(2): /dolorum/et
WindowsDirectory(2): x:\odio\accusamus
DriveLetter(): a:\
====Fake File Paths====
AbsoluteFilePath(2): /nemo/expedita/impedit.csv
AbsoluteFilePathForUnix(2): /molestias/aut/enim.m3u
AbsoluteFilePathForWindows(2): e:\dolores\maiores\in.eot
GOOS: windows
====Fake Directories====
Directory(2): w:\libero\excepturi
UnixDirectory(2): /id/rerum
WindowsDirectory(2): n:\quos\aut
DriveLetter(): e:\
====Fake File Paths====
AbsoluteFilePath(2): x:\in\est\rerum.pl
AbsoluteFilePathForUnix(2): /eveniet/perspiciatis/ratione.ttf
AbsoluteFilePathForWindows(2): s:\doloremque\voluptas\et.gif
@jaswdr I added the OSResolver
interface to take care of that, wasn't sure if it needed to go it utils.go
, file.go
or directory.go
but utils.go
seemed like a good place for it. Let me know what you think.
Description
This PR adds fake directories to file.go, including tests.
Are you trying to fix an existing issue?
No
Go Version
Go Tests