emb

package
v0.0.0-...-45da7de Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Asset

func Asset(f fs.FS, name string, useGzip bool) (data []byte, hash, contentType string, err error)

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 AssetBytes

func AssetBytes(f fs.FS, name string, useGzip bool) (data []byte)

func AssetString

func AssetString(f fs.FS, name string, useGzip bool) string

func FileHandler

func FileHandler(f fs.FS, name string) http.HandlerFunc

func ParseUI

func ParseUI(web embed.FS, subName string, funcs template.FuncMap, asTemplate bool) (sub fs.FS, t *template.Template, err error)

func ServeFile

func ServeFile(f fs.FS, name string, w http.ResponseWriter, r *http.Request)

func ServeFileGzip

func ServeFileGzip(f fs.FS, name string, w http.ResponseWriter, r *http.Request, useGzip bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL