Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeDir ¶
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)
Click to show internal directories.
Click to hide internal directories.