-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Go's new FS interface is pretty cool, I've used in quite a few projects to serve files embedded into the binary, to do overlayFS-like stuff (merge multiple directories as one) etc. fs.FS enables all of this craziness.
My proposal: instead of giving direct filesystem path like /my/path
to a module, the module would take in fs.FS
and you could give in os.DirFS("/my/path")
.
I am willing to send a PR if you are interested. I have not read through the server code to check if there are any requirements that don't have direct analogies in fs
interfaces. uid/gid things in Stat()
calls would be one thing not present in fs.FileInfo. Those cases would need to be type-switched on (check if stat result is a structure that actually carries uid/gid)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request