code: func MIMETypeByExtension(ext string) string {
  	mimeParts := strings.SplitN(mime.TypeByExtension(ext), ";", 2)
  	return strings.TrimSpace(mimeParts[0])
  }
docs: // MIMETypeByExtension calls mime.TypeByExtension, and removes optional parameters,
  // to keep only the type and subtype.