Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http
21.91k
stars
1.76k
forks
source link
fs: fix GenerateIndexPages when DirFS or embed.FS is used #1778
Closed
efectn closed 6 months ago
In current implementation of Fasthttp FS, GenerateIndexPages doesn't work properly with DirFS or embed.FS because of
fs.ValidPath
function.When you open
""
path using with DirFS it returnsinvalid path error
. When using embed.FS, it returnsfile does not exist
error.So, if the path is
""
both cases need to covered properly.Note: I ain't also sure this is a good solution. Perhaps need smarter solution to cover more edge cases.