-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[doc] add some go doc in conn.go #60
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this. Good documentation or some documentation makes godocs easier to read so this is great and has been a long standing issue!
I have a couple of nits, but other than that it looks good. If you could address them then we'll land this!
conn.go
Outdated
@@ -54,6 +54,7 @@ type watchPathType struct { | |||
wType watchType | |||
} | |||
|
|||
// Dailer is the connection dialer function for ZK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling mistake. Should be Dialer
not Dailer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is sorta redundant (i.e Dialer is a dialer).
Perhaps something like:
// Dialer is a function to be used to establish a connection to a single host.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's better, I'v modified it.
conn.go
Outdated
@@ -66,6 +67,8 @@ type authCreds struct { | |||
auth []byte | |||
} | |||
|
|||
// Conn is the connection object for a ZK client, it holds all the stuff one | |||
// needs to communicate with ZK server, all the properties should be private. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would simplify this a bit. Something like
// Conn is the client connection and tracks all details for communication with the server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point taken. Thanks, I'll learn to improve in the future. :)
conn.go
Outdated
@@ -138,6 +141,8 @@ type response struct { | |||
err error | |||
} | |||
|
|||
// Event is an Znode event sent by the ZK server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove ZK
(we know it should be a zookeeper server) here and change Refers
to just Refer to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Motified as advices. :)
Codecov Report
@@ Coverage Diff @@
## master #60 +/- ##
==========================================
+ Coverage 76.11% 76.70% +0.58%
==========================================
Files 7 7
Lines 1189 1189
==========================================
+ Hits 905 912 +7
+ Misses 195 190 -5
+ Partials 89 87 -2
Continue to review full report at Codecov.
|
Looks great. Thank you! |
The pull comes as the help of the issue #4 . If you guys see it O.K., I'll continue to add other missing comments. FYI, I'm happy to participant in an Open Source project. Thanks for your time.