fileserver

package
v0.0.0-...-ff0f340 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2013 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeDir

func ServeDir(dir, address string, cache bool) error

Serve the directory `dir` using HTTP on the specified TCP address.

`dir`: filepath to serve. `address`: TCP address (`"<host>:<port>"`). The host can be omitted. `cache`: If false, the browser is sent headers to prevent it from caching content.

Types

type FileServer

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

func NewFileServer

func NewFileServer(dir http.FileSystem, cache bool) *FileServer

func (*FileServer) ServeHTTP

func (s *FileServer) 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