frontend

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LabctlFileServer

func LabctlFileServer() http.Handler

func SinglePageAppFileServer

func SinglePageAppFileServer(hfs fs.FS, urlRoot, fsRoot string) http.Handler

Types

type SPAFileSystem

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

FileSystem custom file system handler

func (SPAFileSystem) Open

func (spafs SPAFileSystem) Open(path string) (http.File, error)

Open file with fallback to index.html https://gist.github.com/hauxe/f2ea1901216177ccf9550a1b8bd59178#file-http_static_correct-go

type SlashFix

type SlashFix struct {
	Mux http.Handler
}

func (*SlashFix) ServeHTTP

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