From 0fae2e1bdd4714558e6fb6987b077e4eaf19a2a0 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Mon, 24 May 2021 23:11:05 +0300 Subject: [PATCH] move default content type to const Signed-off-by: Vasiliy Tolstov --- grpc.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/grpc.go b/grpc.go index 38284db..1d03a3f 100644 --- a/grpc.go +++ b/grpc.go @@ -22,6 +22,10 @@ import ( gmetadata "google.golang.org/grpc/metadata" ) +const ( + defaultContentType = "application/grpc+proto" +) + type grpcClient struct { opts client.Options pool *pool @@ -723,7 +727,7 @@ func (g *grpcClient) getGrpcCallOptions() []grpc.CallOption { func NewClient(opts ...client.Option) client.Client { options := client.NewOptions(opts...) // default content type for grpc - options.ContentType = "application/grpc+proto" + options.ContentType = defaultContentType rc := &grpcClient{ opts: options,