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/10/09 08:28:13 UTC

[GitHub] [dubbo-go] justxuewei edited a comment on pull request #1507: refactor(cluster): refactor cluster package

justxuewei edited a comment on pull request #1507:
URL: https://github.com/apache/dubbo-go/pull/1507#issuecomment-939255596


   > 这样会不会反而增加了使用时的可读门槛?
   
   我个人认为不会,因为对外访问一般是通过 extension.GetCluster 函数,该函数返回的是一个 cluster.Cluster 的 interface,用户需要通过 interface 再找到相应的 cluster 定义,一般不会直接使用 xxxCluster(Invoker 同理,一般都会先定位到 interface)。在现有目录下,每种 cluster 的结构和定义都更加清晰,且有更良好的扩充性,这是我想要做这次重构的初衷。
   
   > 常量命名要统一改驼峰形式
   
   是的,Golang 中 `XX_YY_ZZ` 本身是不符合规范的,所以驼峰式命名我个人认为会好一些。但是本次 PR 只是重构 cluster 相关代码,不涉及到常量名重构,这部分内容可以以后在实现。


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