Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultFS = &fasthttp.FS{ Compress: true, IndexNames: []string{"index.html"}, Root: ".", AcceptByteRange: true, }
DefaultFS the defalut config of fasthttp.FS
Functions ¶
func New ¶
func New(fs *fasthttp.FS) func(ctx *fasthttp.RequestCtx, next func(error))
New accepts fs which is a *fasthttp.FS pointer.
if the http request method is not 'GET' or 'HEAD', the static will call next(nil)
if the http request file does not exist or the directory does not have the IndexNames file. the static will call next(nil)
or, fasthttp.FS will handle the request file or the IndexNames file in the request directory
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.