code: func matchesContentType(contentType, expectedType string) bool {
  	mimetype, _, err := mime.ParseMediaType(contentType)
  	if err != nil {
  		logrus.Errorf("Error parsing media type: %s error: %v", contentType, err)
  	}
  	return err == nil && mimetype == expectedType
  }
docs: // matchesContentType validates the content type against the expected one