From 48a7e968d1a148aa05fd1548f2ec1118f60b76c6 Mon Sep 17 00:00:00 2001 From: Piotr Biernat Date: Thu, 1 Dec 2022 19:54:59 +0100 Subject: [PATCH] register fix --- consul/discovery.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consul/discovery.go b/consul/discovery.go index 73b4ce6..ec3f219 100644 --- a/consul/discovery.go +++ b/consul/discovery.go @@ -26,7 +26,7 @@ var ErrServiceUnavailable = fmt.Errorf("Service is unavailable") func NewService(serverAddr, appID, appName, ip, domain string, appPort int) (*Service, error) { s := new(Service) s.AppID = appID - s.Name = strings.Replace(appName, "-", "_", -1) + s.Name = strings.Replace(appName, "-", "", -1) s.Address = domain s.IP = ip s.Port = appPort