// SetHTTPBodyMarshaler overwrite the default marshaler with the HTTPBodyMarshaler func SetHTTPBodyMarshaler(serveMux *ServeMux) { … } type HTTPBodyMarshaler … // ContentType implementation to keep backwards compatibility with marshal interface func (h *HTTPBodyMarshaler) ContentType() string { … } // ContentTypeFromMessage in case v is a google.api.HttpBody message it returns // its specified content type otherwise fall back to the default Marshaler. func (h *HTTPBodyMarshaler) ContentTypeFromMessage(v interface{ … } // Marshal marshals "v" by returning the body bytes if v is a // google.api.HttpBody message, otherwise it falls back to the default Marshaler. func (h *HTTPBodyMarshaler) Marshal(v interface{ … }