From cd91fe6e3cec93d09887e814ca93dee1b0b6ea42 Mon Sep 17 00:00:00 2001
From: "vito.he" <hxmhlt@163.com>
Date: Fri, 17 Apr 2020 11:33:28 +0800
Subject: [PATCH] Mod:rw problem

---
 metadata/definition/definition.go                  | 5 +++--
 metadata/identifier/base_metadata_identifier.go    | 4 ++--
 metadata/service/exporter/configurable/exporter.go | 5 ++---
 metadata/service/service.go                        | 5 -----
 4 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/metadata/definition/definition.go b/metadata/definition/definition.go
index 81b9e58c8..8d4a584ee 100644
--- a/metadata/definition/definition.go
+++ b/metadata/definition/definition.go
@@ -23,6 +23,7 @@ import (
 
 import (
 	"github.com/apache/dubbo-go/common"
+	"github.com/apache/dubbo-go/common/constant"
 )
 
 // ServiceDefinition is the describer of service definition
@@ -77,11 +78,11 @@ func ServiceDescriperBuild(serviceName string, group string, version string) str
 	buf := &bytes.Buffer{}
 	if group != "" {
 		buf.WriteString(group)
-		buf.WriteString("/")
+		buf.WriteString(constant.PATH_SEPARATOR)
 	}
 	buf.WriteString(serviceName)
 	if version != "" && version != "0.0.0" {
-		buf.WriteString(":")
+		buf.WriteString(constant.KEY_SEPARATOR)
 		buf.WriteString(version)
 	}
 	return buf.String()
diff --git a/metadata/identifier/base_metadata_identifier.go b/metadata/identifier/base_metadata_identifier.go
index 0cd8b075f..64290c668 100644
--- a/metadata/identifier/base_metadata_identifier.go
+++ b/metadata/identifier/base_metadata_identifier.go
@@ -67,7 +67,7 @@ func (mdi *BaseMetadataIdentifier) getFilePathKey(params ...string) string {
 		withPathSeparator(mdi.Version) +
 		withPathSeparator(mdi.Group) +
 		withPathSeparator(mdi.Side) +
-		joinParams("/", params)
+		joinParams(constant.PATH_SEPARATOR, params)
 
 }
 
@@ -88,7 +88,7 @@ func serviceToPath(serviceInterface string) string {
 //withPathSeparator...
 func withPathSeparator(path string) string {
 	if len(path) != 0 {
-		path = "/" + path
+		path = constant.PATH_SEPARATOR + path
 	}
 	return path
 }
diff --git a/metadata/service/exporter/configurable/exporter.go b/metadata/service/exporter/configurable/exporter.go
index c3338c962..fd3527df5 100644
--- a/metadata/service/exporter/configurable/exporter.go
+++ b/metadata/service/exporter/configurable/exporter.go
@@ -62,11 +62,10 @@ func (exporter *MetadataServiceExporter) Export() error {
 		err := exporter.serviceConfig.Export()
 		logger.Infof("The MetadataService exports urls : %v ", exporter.serviceConfig.GetExportedUrls())
 		return err
-	} else {
-		logger.Warnf("The MetadataService has been exported : %v ", exporter.serviceConfig.GetExportedUrls())
-		return nil
 	}
 
+	logger.Warnf("The MetadataService has been exported : %v ", exporter.serviceConfig.GetExportedUrls())
+	return nil
 }
 
 // Unexport will unexport the metadataService
diff --git a/metadata/service/service.go b/metadata/service/service.go
index 276e3945b..21e50335e 100644
--- a/metadata/service/service.go
+++ b/metadata/service/service.go
@@ -61,8 +61,3 @@ type BaseMetadataService struct {
 func (mts *BaseMetadataService) ServiceName() (string, error) {
 	return config.GetApplicationConfig().Name, nil
 }
-
-// RefreshMetadata is used for event listener's calling, to refresh metadata
-//func (mts *BaseMetadataService) RefreshMetadata(exportedRevision string, subscribedRevision string) bool {
-//	return true
-//}
-- 
GitLab