diff --git a/metadata/definition/definition.go b/metadata/definition/definition.go index 81b9e58c822fe1c58f2ce4ae439f9a391ea4b972..8d4a584ee53c7c5ebbc4cc2222134ca9e957068f 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 0cd8b075ff889fbfc04888703422ce76a3a859c4..64290c668f14277a5f2c8b9e7603ca50e7713fd6 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 c3338c9621d75db92302c4c5bd3860e2f38504d1..fd3527df5cc12de30d3af0247aaf4ac717982ceb 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 276e3945b829439c04526102209cad8d003e0566..21e50335e23e588c0fe2b219a464bd98dfe1f8d9 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 -//}