FileServer returns a handler that serves HTTP requests with the contents of the file system rooted at root.
package main import ( "log" "net/http" ) func main() { // Simple static webserver: log.Fatal(http.ListenAndServe(":8080", http.FileServer(http.Dir("/usr/share/doc")))) }