MIMETypeByExtension calls mime.TypeByExtension, and removes optional parameters, to keep only the type and subtype.
(ext string)
| 274 | // MIMETypeByExtension calls mime.TypeByExtension, and removes optional parameters, |
| 275 | // to keep only the type and subtype. |
| 276 | func MIMETypeByExtension(ext string) string { |
| 277 | mimeParts := strings.SplitN(mime.TypeByExtension(ext), ";", 2) |
| 278 | return strings.TrimSpace(mimeParts[0]) |
| 279 | } |
| 280 | |
| 281 | var pict = []byte("pict") |
| 282 |
no outgoing calls
no test coverage detected