Documentation ¶
Index ¶
Constants ¶
View Source
const ( KB MB GB TB PB EB )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { // Skipper defines a function to skip middleware. Skipper route.Skipper // Root directory from where the static content is served. // Required. Root string `yaml:"root"` // Index file for serving a directory. // Optional. Default value "index.html". Index string `yaml:"index"` // Enable HTML5 mode by forwarding all not-found requests to root so that // SPA (single-page application) can handle the routing. // Optional. Default value false. HTML5 bool `yaml:"html5"` // Enable directory browsing. // Optional. Default value false. Browse bool `yaml:"browse"` }
Options defines the config for Static middleware.
func GetDefaultOptions ¶
func GetDefaultOptions() Options
Click to show internal directories.
Click to hide internal directories.