You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2020/06/08 02:18:22 UTC

[GitHub] [dubbo-go] zouyx commented on a change in pull request #588: Mod: add comment for metadata

zouyx commented on a change in pull request #588:
URL: https://github.com/apache/dubbo-go/pull/588#discussion_r436429988



##########
File path: metadata/identifier/service_metadata_identifier.go
##########
@@ -27,12 +27,12 @@ type ServiceMetadataIdentifier struct {
 	BaseMetadataIdentifier
 }
 
-// getIdentifierKey...
+// getIdentifierKey gets metadata identifier key by @mdi.protocol and @mdi.revision
 func (mdi *ServiceMetadataIdentifier) getIdentifierKey(params ...string) string {
-	return mdi.BaseMetadataIdentifier.getIdentifierKey(mdi.protocol + constant.KEY_REVISON_PREFIX + mdi.revision)
+	return mdi.BaseMetadataIdentifier.getIdentifierKey(mdi.protocol, constant.KEY_REVISON_PREFIX, mdi.revision)

Review comment:
       I think should not change `+` to `,` 
   
   When
   `
   protocol="a"
   revision="b"
   `
   
   In `BaseServiceMetadataIdentifier.getIdentifierKey` use `+` , result is `arevisionb`.
   
   In `BaseServiceMetadataIdentifier.getIdentifierKey` use `,` , result is `a:revision:b`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org