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 2021/09/28 04:48:23 UTC

[GitHub] [dubbo-go] Mulavar commented on a change in pull request #1491: feat(config): add root config api builder

Mulavar commented on a change in pull request #1491:
URL: https://github.com/apache/dubbo-go/pull/1491#discussion_r717220016



##########
File path: config/application_config.go
##########
@@ -113,3 +113,53 @@ func WithMetadataType(metadataType string) ApplicationConfigOpt {
 		ac.MetadataType = metadataType
 	}
 }
+
+func NewApplicationConfigBuilder() *ApplicationConfigBuilder {
+	return &ApplicationConfigBuilder{application: &ApplicationConfig{}}
+}
+
+type ApplicationConfigBuilder struct {
+	application *ApplicationConfig
+}
+
+func (acb *ApplicationConfigBuilder) Organization(organization string) *ApplicationConfigBuilder {

Review comment:
       一般这种builder模式的运用,在链式赋值时都不会使用set。
   我理解是因为这种模式下没有 get 的场景,所以单独的 set 并不会给到更多的语义信息,可忽略。




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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