Rob_S
(Rob)
1
In Go, does Windows require a back slash when referencing files?
For example:
Linux file: /mnt/whatever/filename.ext
Windows: C:\whatever\filename.ext
In Go, even while in Windows, seems like you can reference files with unix style forward slashes? Is that true?
Do you reference the C drive and a folder simply by: “C/whateverfolder”
I realize I can do string(os.PathSeparator), but I’d rather not if I don’t have to.
Thanks!
NobbZ
(Norbert Melzer)
2
Any windows version supported by the go runtime allows to use forward slashes.
This is an attribute of modern windows and a languages runtime doesn’t need to do anything special anymore since windows 7 or something…
system
(system)
Closed
3
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.