From 4e4a12a05f0664441483339a259e55d8a3d63a82 Mon Sep 17 00:00:00 2001
From: shen <zhangqi1@cmiot.chinamobile.com>
Date: Wed, 9 Sep 2020 08:59:41 +0800
Subject: [PATCH] delete unused code

---
 registry/consul/service_discovery.go | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/registry/consul/service_discovery.go b/registry/consul/service_discovery.go
index 7dd0ade65..0d5e43c5f 100644
--- a/registry/consul/service_discovery.go
+++ b/registry/consul/service_discovery.go
@@ -45,10 +45,6 @@ const (
 	enable = "enable"
 )
 
-var (
-	initLock sync.Mutex
-)
-
 // init will put the service discovery into extension
 func init() {
 	extension.SetServiceDiscovery(constant.CONSUL_KEY, newConsulServiceDiscovery)
@@ -400,7 +396,6 @@ func (csd *consulServiceDiscovery) buildCheck(instance registry.ServiceInstance)
 		deregister = constant.DEFAULT_DEREGISTER_TIME
 	}
 	return consul.AgentServiceCheck{
-		//CheckID:                        buildID(instance),
 		TTL:                            strconv.FormatInt(csd.checkPassInterval/1000, 10) + "s",
 		DeregisterCriticalServiceAfter: csd.deregisterCriticalServiceAfter,
 	}
@@ -428,8 +423,9 @@ func getDeregisterAfter(metadata map[string]string) string {
 	}
 	return deregister
 }
-func buildID(instance registry.ServiceInstance) string {
 
+// nolint
+func buildID(instance registry.ServiceInstance) string {
 	id := fmt.Sprintf("id:%s,serviceName:%s,host:%s,port:%d", instance.GetId(), instance.GetServiceName(), instance.GetHost(), instance.GetPort())
 	return id
 }
-- 
GitLab