package
module
Version:
v0.0.0-...-0e2fb56
Opens a new window with list of versions in this module.
Published: Jun 24, 2014
License: MIT
Opens a new window with license information.
Imports: 15
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
go-fileserver - Go cached file server
Overview
This is a Go file server equipped with caching feature. See this discussion.
Example
package main
import (
"log"
"net/http"
"github.com/yosssi/go-fileserver"
)
func main() {
fs := fileserver.New(fileserver.Options{})
http.Handle("/", fs.Serve(http.Dir("/Users/yoshidakeiji/www")))
if err := http.ListenAndServe(":8080", nil); err != nil {
log.Fatal("ListenAndServe: ", err)
}
}
Documentation
¶
Package fileserver provides a cache file server.
func Quit(quitC chan<- struct{}, doneC <-chan struct{})
Quit terminates the file server's detection goroutine.
FileServer is an interface for serving files.
New creates and returns a file server.
Options represents options for a file server.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.