// ParseMethod splits service and method from the input. It expects format // "/service/method". func ParseMethod(methodName string) (service, method string, _ error) { … } const baseContentType … // ContentSubtype returns the content-subtype for the given content-type. The // given content-type must be a valid content-type that starts with // "application/grpc". A content-subtype will follow "application/grpc" after a // "+" or ";". See // https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for // more details. // // If contentType is not a valid content-type for gRPC, the boolean // will be false, otherwise true. If content-type == "application/grpc", // "application/grpc+", or "application/grpc;", the boolean will be true, // but no content-subtype will be returned. // // contentType is assumed to be lowercase already. func ContentSubtype(contentType string) (string, bool) { … } // ContentType builds full content type with the given sub-type. // // contentSubtype is assumed to be lowercase func ContentType(contentSubtype string) string { … }