Closed
Description
It looks like the Godoc for http.ServeFileFS
was copied verbatim from http.ServeFile
. In particular, the mention of a "current directory" doesn't make any sense when serving from an fs.FS
:
If the provided file or directory name is a relative path, it is interpreted relative to the current directory and may ascend to parent directories. If the provided name is constructed from user input, it should be sanitized before calling ServeFile.
I think the rest of the documentation is correct, except that ServeFile
needs to be replaced by ServeFileFS
in a few places.