More unit tests
This commit is contained in:
@@ -14,7 +14,7 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
// It returns a http.Filesystem that can be used by http.FileServer(). It is used interally
|
||||
// Dir returns a http.Filesystem that can be used by http.FileServer(). It is used interally
|
||||
// in router.Static().
|
||||
// if listDirectory == true, then it works the same as http.Dir() otherwise it returns
|
||||
// a filesystem that prevents http.FileServer() to list the directory files.
|
||||
@@ -22,9 +22,8 @@ func Dir(root string, listDirectory bool) http.FileSystem {
|
||||
fs := http.Dir(root)
|
||||
if listDirectory {
|
||||
return fs
|
||||
} else {
|
||||
return &onlyfilesFS{fs}
|
||||
}
|
||||
return &onlyfilesFS{fs}
|
||||
}
|
||||
|
||||
// Conforms to http.Filesystem
|
||||
|
||||
Reference in New Issue
Block a user