Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileServer ¶
func (FileServer) ServeDir ¶
func (fs FileServer) ServeDir(contentType string) func(w http.ResponseWriter, r *http.Request)
ServeDir handles the static files using the same Content-Type.
func (FileServer) ServeFile ¶
func (fs FileServer) ServeFile(urlPath, contentType string) func(w http.ResponseWriter, r *http.Request)
ServeFile handles one specific file (and its specific Content-Type).
func (FileServer) ServeImages ¶
func (fs FileServer) ServeImages() func(w http.ResponseWriter, r *http.Request)
ServeImages detects the Content-Type depending on the image extension.
Click to show internal directories.
Click to hide internal directories.