staticfiles

package
v1.6.8 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EntryHandler = NewFileHandler()

Functions

func AddFS

func AddFS(filesys fs.FS, matches func(path string) bool)

func Collect

func Collect(fn func(path string, f fs.File) error) error

func Open

func Open(name string) (fs.File, error)

Types

type FileHandler

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

func NewFileHandler

func NewFileHandler() *FileHandler

func (*FileHandler) AddFS

func (h *FileHandler) AddFS(filesys fs.FS, matches func(path string) bool)

func (*FileHandler) Collect

func (h *FileHandler) Collect(fn func(path string, f fs.File) error) error

func (*FileHandler) Open

func (h *FileHandler) Open(name string) (fs.File, error)

func (*FileHandler) ServeHTTP

func (h *FileHandler) 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