If the response body returned by grpc transport is a bytes.Buffer object, callers can use its Write methods to modify its contents. This is not desirable.
This PR fixes it by returning a bytes.Reader instead of a bytes.Buffer, making the returned response body read-only.
If the response body returned by grpc transport is a
bytes.Buffer
object, callers can use its Write methods to modify its contents. This is not desirable.This PR fixes it by returning a
bytes.Reader
instead of abytes.Buffer
, making the returned response body read-only.