code: func Convert(r io.Reader, mimeType string, readability bool) (*Response, error) {
  	start := time.Now()
  
  	var body string
  	var meta map[string]string
  	var err error
  	switch mimeType {
  	case "application/msword", "application/vnd.ms-word":
  		body, meta, err = ConvertDoc(r)
  
  	case "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
  		body, meta, err = ConvertDocx(r)
  
  	case "application/vnd.oasis.opendocument.text":
  		body, meta, err = ConvertODT(r)
  
  	case "application/vnd.apple.pages", "application/x-iwork-pages-sffpages":
  		body, meta, err = ConvertPages(r)
  
  	case "application/pdf":
  		body, meta, err = ConvertPDF(r)
  
  	case "application/rtf", "application/x-rtf", "text/rtf", "text/richtext":
  		body, meta, err = ConvertRTF(r)
  
  	case "text/html":
  		body, meta, err = ConvertHTML(r, readability)
  
  	case "text/url":
  		body, meta, err = ConvertURL(r, readability)
  
  	case "text/xml", "application/xml":
  		body, meta, err = ConvertXML(r)
  
  	case "image/jpeg", "image/png", "image/tif", "image/tiff":
  		body, meta, err = ConvertImage(r)
  
  	case "text/plain":
  		var b []byte
  		b, err = ioutil.ReadAll(r)
  		body = string(b)
  	}
  
  	if err != nil {
  		return nil, fmt.Errorf("error converting data: %v", err)
  	}
  
  	return &Response{
  		Body:  strings.TrimSpace(body),
  		Meta:  meta,
  		MSecs: uint32(time.Since(start) / time.Millisecond),
  	}, nil
  }
docs: // Convert a file to plain text.