code: func FormatFromContentType(v string) (Format, error) {
  	if v == "" {
  		return FormatBinary, nil
  	}
  	mediaType, mediaTypeParams, err := mime.ParseMediaType(v)
  	if err != nil {
  		return 0, err
  	}
  	return FormatFromMediaType(mediaType, mediaTypeParams)
  }
docs: // FormatFromContentType converts Content-Type header value from a request to a
  // format.
  // Can return only FormatBinary, FormatJSONPB or FormatText.
  // In case of an error, format is undefined.