static

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StaticFileServer

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

StaticFileServer implements a static file http server that serves static files out of the runfiles bundled with this application.

func NewStaticFileServer

func NewStaticFileServer(env environment.Env, relPath string, rootPaths []string) (*StaticFileServer, error)

NewStaticFileServer returns a new static file server that will serve the content in relpath, optionally stripping the prefix.

func (*StaticFileServer) ServeHTTP

func (s *StaticFileServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements the HTTP HandlerFunc interface.

Jump to

Keyboard shortcuts

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