Documentation ¶ Index ¶ type Config type Mime func (e Mime) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Config ¶ type Config struct { UseDefaults bool Extensions map[string]string } Config represent a mime config. Map from extension to mime-type. Note, this should be safe with concurrent read access, as this is not modified concurrently. type Mime ¶ type Mime struct { Next httpserver.Handler Configs Config } Mime sets Content-Type header of requests based on configurations. func (Mime) ServeHTTP ¶ func (e Mime) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) ServeHTTP implements the httpserver.Handler interface. Source Files ¶ View all Source files defaults.go mime.go setup.go Click to show internal directories. Click to hide internal directories.