More unit tests

This commit is contained in:
Manu Mtz-Almeida
2015-07-03 04:20:18 +02:00
parent 4194adce4c
commit 0316b735c4
3 changed files with 24 additions and 5 deletions
+2 -3
View File
@@ -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