FileServer (StripPrefix) in Go
FileServer returns a handler that serves HTTP requests with the contents of the file system rooted at root.
package main
import "net/http"
func main() {
// To serve a directory on disk (/tmp) under an alternate URL
// path (/tmpfiles/), use StripPrefix to modify the request
// URL's path before the FileServer sees it:
http.Handle("/tmpfiles/", http.StripPrefix("/tmpfiles/", http.FileServer(http.Dir("/tmp"))))
}