feat(fs): Export, test and document OnlyFilesFS (#3939)

This commit is contained in:
Johannes Eiglsperger
2024-05-08 09:47:54 +02:00
committed by GitHub
parent b1c1e7b572
commit 8791c96960
3 changed files with 101 additions and 24 deletions
+1 -1
View File
@@ -218,7 +218,7 @@ func (group *RouterGroup) createStaticHandler(relativePath string, fs http.FileS
fileServer := http.StripPrefix(absolutePath, http.FileServer(fs))
return func(c *Context) {
if _, noListing := fs.(*onlyFilesFS); noListing {
if _, noListing := fs.(*OnlyFilesFS); noListing {
c.Writer.WriteHeader(http.StatusNotFound)
}