From 6c14e82c921699f90e514248a550f0a2d47ff1b9 Mon Sep 17 00:00:00 2001 From: "suguo.yao" Date: Mon, 4 Oct 2021 13:57:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=86=99=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grpc/grpc.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grpc/grpc.go b/grpc/grpc.go index 9c7e132..918f5db 100644 --- a/grpc/grpc.go +++ b/grpc/grpc.go @@ -18,7 +18,7 @@ type Config struct { Address string Port int AppName string - opts []grpc.ServerOption + Opts []grpc.ServerOption } var rpc *grpc.Server @@ -30,13 +30,13 @@ func Init(config *Config) *grpc.Server { Address: "0.0.0.0", Port: 0, AppName: "unknown", - opts: []grpc.ServerOption{grpc.MaxRecvMsgSize(1024 * 1024), grpc.MaxSendMsgSize(1024 * 1024)}, + Opts: []grpc.ServerOption{grpc.MaxRecvMsgSize(1024 * 1024), grpc.MaxSendMsgSize(1024 * 1024)}, } } conf = config if rpc == nil { - rpc = grpc.NewServer(conf.opts...) + rpc = grpc.NewServer(conf.Opts...) } return rpc }