Skip to content

Commit

Permalink
noredirect.FileServer doc
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed Jan 20, 2024
1 parent b227706 commit f375be2
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions noredirect/noredirect.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,6 @@ import (

// FileServer returns a handler that serves HTTP requests
// with the contents of the file system rooted at root.
//
// As a special case, the returned file server redirects any request
// ending in "/index.html" to the same path, without the final
// "index.html".
//
// To use the operating system's file system implementation,
// use http.Dir:
//
// http.Handle("/", http.FileServer(http.Dir("/tmp")))
//
// To use an fs.FS implementation, use http.FS to convert it:
//
// http.Handle("/", http.FileServer(http.FS(fsys)))
func FileServer(root http.FileSystem) http.Handler {
return &fileHandler{root}
}
Expand Down

0 comments on commit f375be2

Please sign in to comment.