fs

package
v0.40.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultResolver

func DefaultResolver(req *http.Request) string

func Sub added in v0.40.2

func Sub(fsys fs.FS, dir string) (fs.FS, error)

Types

type FS

type FS struct {
	FS          fs.FS
	Index       string
	Resolver    ResolverFunc
	ErrNotFound http.Handler
}

func (*FS) Middleware

func (fsys *FS) Middleware(next http.Handler) http.Handler

func (*FS) ServeHTTP

func (fsys *FS) ServeHTTP(rw http.ResponseWriter, req *http.Request)

type FileHandler

type FileHandler struct {
	fs.File
}

func (*FileHandler) ServeHTTP

func (h *FileHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)

type ResolverFunc

type ResolverFunc func(req *http.Request) string

Jump to

Keyboard shortcuts

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