Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FS ¶
func FS(fsys fs.FS) http.FileSystem
FS converts fsys to a [FileSystem] implementation, for use with [FileServer] and [NewFileTransport]. The files provided by fsys must implement io.Seeker. This custom FS implement solves the caching problem when serving embedded files. The idea comes from https://www.reddit.com/r/golang/comments/118pqb2/comment/j9io84v/
Types ¶
Click to show internal directories.
Click to hide internal directories.