From df9fa0c938242f7fbeb2a4f8af6d5df511a4db0d Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Mon, 8 Jul 2019 08:01:42 +0100 Subject: [PATCH] Remove Port from registry --- grpc.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/grpc.go b/grpc.go index 75b8823..8d2a2d8 100644 --- a/grpc.go +++ b/grpc.go @@ -534,8 +534,7 @@ func (g *grpcServer) Register() error { // register service node := ®istry.Node{ Id: config.Name + "-" + config.Id, - Address: addr, - Port: port, + Address: fmt.Sprintf("%s:%d", addr, port), Metadata: config.Metadata, } @@ -658,8 +657,7 @@ func (g *grpcServer) Deregister() error { node := ®istry.Node{ Id: config.Name + "-" + config.Id, - Address: addr, - Port: port, + Address: fmt.Sprintf("%s:%d", addr, port), } service := ®istry.Service{