Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStatic ¶
func NewStatic(opts StaticOptions) gear.Middleware
NewStatic returns a Static middleware to serves static content from the provided root directory.
Types ¶
type StaticOptions ¶
type StaticOptions struct { Root string // The directory you wish to serve Prefix string // The url prefix you wish to serve as static request, default to `'/'`. StripPrefix bool // Strip the prefix from URL path, default to `false`. }
StaticOptions is static middleware options
Click to show internal directories.
Click to hide internal directories.