diff --git a/common/extension/metadata_report_factory.go b/common/extension/metadata_report_factory.go index 7a113c4606fc4194849332c5e73ffc5f3a8d94bb..89dab0409987d8959b5761771c8893abaf88673b 100644 --- a/common/extension/metadata_report_factory.go +++ b/common/extension/metadata_report_factory.go @@ -18,20 +18,20 @@ package extension import ( - "github.com/apache/dubbo-go/metadata/report_factory" + "github.com/apache/dubbo-go/metadata/report/factory" ) var ( - metaDataReportFactories = make(map[string]func() report_factory.MetadataReportFactory, 8) + metaDataReportFactories = make(map[string]func() factory.MetadataReportFactory, 8) ) // SetMetadataReportFactory ... -func SetMetadataReportFactory(name string, v func() report_factory.MetadataReportFactory) { +func SetMetadataReportFactory(name string, v func() factory.MetadataReportFactory) { metaDataReportFactories[name] = v } // GetMetadataReportFactory ... -func GetMetadataReportFactory(name string) report_factory.MetadataReportFactory { +func GetMetadataReportFactory(name string) factory.MetadataReportFactory { if metaDataReportFactories[name] == nil { panic("metadata report for " + name + " is not existing, make sure you have import the package.") } diff --git a/metadata/report_factory/report_factory.go b/metadata/report/factory/report_factory.go similarity index 97% rename from metadata/report_factory/report_factory.go rename to metadata/report/factory/report_factory.go index b74334d6a9ea12c0b2bc8425a6c42d6053842aad..2774fcc31ab0da8370ce83fe9b3659ffa9e1e8b8 100644 --- a/metadata/report_factory/report_factory.go +++ b/metadata/report/factory/report_factory.go @@ -15,7 +15,7 @@ * limitations under the License. */ -package report_factory +package factory import ( "github.com/apache/dubbo-go/common" diff --git a/metadata/service_exporter/configurable/exporter.go b/metadata/service/exporter/configurable/exporter.go similarity index 97% rename from metadata/service_exporter/configurable/exporter.go rename to metadata/service/exporter/configurable/exporter.go index 8033e164206f6041bfd03028ed40f6ebda60c7e6..a8d73c2a2c6584c165f87ce9ed5281f088172b8f 100644 --- a/metadata/service_exporter/configurable/exporter.go +++ b/metadata/service/exporter/configurable/exporter.go @@ -28,7 +28,6 @@ import ( "github.com/apache/dubbo-go/common/logger" "github.com/apache/dubbo-go/config" "github.com/apache/dubbo-go/metadata/service" - "github.com/apache/dubbo-go/metadata/service_exporter" ) // MetadataServiceExporter is the ConfigurableMetadataServiceExporter which implement MetadataServiceExporter interface @@ -39,7 +38,7 @@ type MetadataServiceExporter struct { } // NewMetadataServiceExporter will return a service_exporter.MetadataServiceExporter with the specified metadata service -func NewMetadataServiceExporter(metadataService service.MetadataService) service_exporter.MetadataServiceExporter { +func NewMetadataServiceExporter(metadataService service.MetadataService) service.MetadataServiceExporter { return &MetadataServiceExporter{ metadataService: metadataService, } diff --git a/metadata/service_exporter/configurable/exporter_test.go b/metadata/service/exporter/configurable/exporter_test.go similarity index 94% rename from metadata/service_exporter/configurable/exporter_test.go rename to metadata/service/exporter/configurable/exporter_test.go index 0975f07213c7094d8ee6ce5b5f76bffaf3c89908..e67bf07a39ed8f3c603cc18be3a6e1845b610264 100644 --- a/metadata/service_exporter/configurable/exporter_test.go +++ b/metadata/service/exporter/configurable/exporter_test.go @@ -18,6 +18,7 @@ package configurable import ( + "github.com/apache/dubbo-go/metadata/service" "testing" ) @@ -54,7 +55,7 @@ func TestConfigurableExporter(t *testing.T) { }}) config.MockInitProviderWithSingleRegistry() metadataService := inmemory.NewMetadataService() - exported := NewMetadataServiceExporter(metadataService) + exported := service.NewMetadataServiceExporter(metadataService) assert.Equal(t, false, exported.IsExported()) assert.NoError(t, exported.Export()) assert.Equal(t, true, exported.IsExported()) diff --git a/metadata/service_exporter/exporter.go b/metadata/service/exporter/exporter.go similarity index 97% rename from metadata/service_exporter/exporter.go rename to metadata/service/exporter/exporter.go index 2ccf17f4dd8a54d15645d36bfc080189f77838af..3c71820579f6195177573af914718111048c666a 100644 --- a/metadata/service_exporter/exporter.go +++ b/metadata/service/exporter/exporter.go @@ -15,7 +15,7 @@ * limitations under the License. */ -package service_exporter +package exporter import ( "github.com/apache/dubbo-go/common"