code: func FormatFromEncoding(v string) (Format, error) {
  	switch v {
  	case "", mtPRPCEncodingBinary:
  		return FormatBinary, nil
  	case mtPRPCEncodingJSONPB:
  		return FormatJSONPB, nil
  	case mtPRPCEncodingText:
  		return FormatText, nil
  	default:
  		return 0, fmt.Errorf(`invalid encoding parameter: %q. Valid values: `+
  			`"`+mtPRPCEncodingBinary+`", `+
  			`"`+mtPRPCEncodingJSONPB+`", `+
  			`"`+mtPRPCEncodingText+`"`, v)
  	}
  }
docs: // FormatFromEncoding converts a media type encoding parameter into a pRPC
  // Format.
  // Can return only FormatBinary, FormatJSONPB or FormatText.
  // In case of an error, format is undefined.