lujiajing1126 commented on a change in pull request #24:
URL: https://github.com/apache/skywalking-banyandb/pull/24#discussion_r676550560
##########
File path: pkg/pb/database.go
##########
@@ -25,141 +25,141 @@ import (
v1 "github.com/apache/skywalking-banyandb/api/proto/banyandb/v1"
)
-type shardEventBuilder struct {
+type ShardEventBuilder struct {
Review comment:
> It's not a common pattern in go. If you want to force users to use the
factory method, an interface should be better, which is a canonical pattern to
gophers.
I did some investigation. I seems this pattern does commonly used by
developers.
See https://github.com/golang/lint/issues/210
##########
File path: pkg/pb/database.go
##########
@@ -25,141 +25,141 @@ import (
v1 "github.com/apache/skywalking-banyandb/api/proto/banyandb/v1"
)
-type shardEventBuilder struct {
+type ShardEventBuilder struct {
Review comment:
> It's not a common pattern in go. If you want to force users to use the
factory method, an interface should be better, which is a canonical pattern to
gophers.
I did some investigation. It seems this pattern does commonly used by
developers.
See https://github.com/golang/lint/issues/210
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]