Documentation ¶
Index ¶
- func Asset(f fs.FS, name string, useGzip bool) (data []byte, hash, contentType string, err error)
- func AssetBytes(f fs.FS, name string, useGzip bool) (data []byte)
- func AssetString(f fs.FS, name string, useGzip bool) string
- func FileHandler(f fs.FS, name string) http.HandlerFunc
- func ParseUI(web embed.FS, subName string, funcs template.FuncMap, asTemplate bool) (sub fs.FS, t *template.Template, err error)
- func ServeFile(f fs.FS, name string, w http.ResponseWriter, r *http.Request)
- func ServeFileGzip(f fs.FS, name string, w http.ResponseWriter, r *http.Request, useGzip bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset Gets the file from embed.FS if debug otherwise gets it from the stored data returns the data, the md5 hash of its content and its content type and error if it is not found.
func FileHandler ¶
func FileHandler(f fs.FS, name string) http.HandlerFunc
func ServeFileGzip ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.