staticserve

package
v0.72.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WalkDir added in v0.70.0

func WalkDir(fsys fs.FS, root string, fn func(filename string, ss *StaticServe) (err error)) (err error)

WalkDir walks the file tree rooted at root, calling fn for each file in the tree with the filename having root trimmed (e.g. "root/dir/file.ext" becomes "dir/file.ext").

Types

type StaticServe

type StaticServe struct {
	Name        string
	ContentType string
	Gz          []byte
}

func New

func New(filename string, data []byte) (ss *StaticServe, err error)

func (*StaticServe) ServeHTTP

func (ss *StaticServe) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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