tryfiles

package module
v0.0.0-...-4bb30b1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: MIT Imports: 7 Imported by: 0

README

tryfiles

golang http fileserver with tryfile, used when serve vue dist deploy

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitPool

func InitPool(size int)

Types

type Handler

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

func New

func New() *Handler

func (*Handler) Fs

func (h *Handler) Fs(fs fs.FS, trys ...string) *Handler

func (*Handler) HTTPFs

func (h *Handler) HTTPFs(fs http.FileSystem, trys ...string) *Handler

func (*Handler) NotFound

func (h *Handler) NotFound(notFound http.Handler) *Handler

func (*Handler) RMod

func (h *Handler) RMod(rMod func(*http.Request) *http.Request) *Handler

func (*Handler) ServeHTTP

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

func (*Handler) Strip

func (h *Handler) Strip(prefix string) *Handler

func (*Handler) Strips

func (h *Handler) Strips(suffix string) *Handler

func (*Handler) Try

func (h *Handler) Try(trys ...string) *Handler

Jump to

Keyboard shortcuts

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