Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dir ¶
func Dir(root string, listDirectory bool) http.FileSystem
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.
Types ¶
type ServeFileSystem ¶
type ServeFileSystem interface {
http.FileSystem
Exists(prefix string, path string) bool
}
Click to show internal directories.
Click to hide internal directories.