x/tools/godoc/vfs: path separator character(s) in FileSystem, Opener interfaces is not specified #27715
Labels
Documentation
Issues describing a change to documentation.
NeedsFix
The path to resolution is known, but the work has not been done.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Problem
Documentation for
net/http.FileSystem
reads:However, the
FileSystem
interface ingolang.org/x/tools/godoc/vfs
does not clearly specify what the path separator character is expected or allowed to be:Edit:
vfs.Opener
interface is affected too:We need to document it so this is clear to the users and implementors of the interfaces.
Proposed Resolution
Following logic, I expect that it has to be slash, regardless of host OS conventions, since it's meant to be a virtual filesystem that works across platform boundaries, just like
http.FileSystem
. (Of course, implementations may use non-slash separator paths to access underlying physical filesystems.)Applying
NeedsDecision
label because I want someone else to confirm my reasoning that this is a documentation bug and that we must specify/
as the only allowed path separator element. /cc @andybons @bradfitzThe text was updated successfully, but these errors were encountered: