-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed as not planned
Closed as not planned
Copy link
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
(Sorry for filing all these right around when 1.16 was released, not before. Just bad luck timing.)
I implemented what I thought was the simplest possible empty filesystem:
func (f *FS) Open(name string) (fs.File, error) {
return nil, &fs.PathError{Op: "open", Path: name, Err: fs.ErrNotExist}
}It seems to me that according to the io/fs docs, this is a valid empty filesystem.
testing/fstest.TestFS doesn't like it, though:
--- FAIL: TestEmptyFS (0.01s)
fs_test.go:10: TestFS found errors:
.: Open: open .: file does not exist
Is TestFS wrong? Or are there missing docs requiring the file "." to be openable?
cc @rsc
P.S. golang.org/s/owners doesn't list any owners for io/fs and testing/fstest.
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.