assets

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash added in v0.13.0

func Hash(path string) (string, bool)

Hash returns embeded assets file MD5 hash.

Types

type Config

type Config struct {
	Local        bool      // use local asset files
	LocalDir     string    // path to asset files directory
	LastModified time.Time // asset LastModified
	Logger       interface {
		Debugf(format string, v ...interface{})
	}
}

Config represents configuration

type Handler added in v0.13.0

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(conf *Config) (*Handler, error)

func (*Handler) ServeHTTP added in v0.13.0

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves asset files.

Jump to

Keyboard shortcuts

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