Skip to content
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

Merged
merged 1 commit into from
Jun 28, 2021
Merged

[doc] add some go doc in conn.go #60

merged 1 commit into from
Jun 28, 2021

Conversation

linsite
Copy link

@linsite linsite commented Jun 20, 2021

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.

Copy link

@nemith nemith left a 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.
Copy link

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

Copy link

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.

Copy link
Author

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

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.

Copy link
Author

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

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Motified as advices. :)

@linsite linsite changed the title [comment] add some comment in conn.go [doc] add some go doc in conn.go Jun 23, 2021
@codecov
Copy link

codecov bot commented Jun 28, 2021

Codecov Report

Merging #60 (3f58d5e) into master (54f4812) will increase coverage by 0.58%.
The diff coverage is n/a.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
conn.go 74.25% <ø> (+1.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 54f4812...3f58d5e. Read the comment docs.

@nemith
Copy link

nemith commented Jun 28, 2021

Looks great. Thank you!

@nemith nemith merged commit 81dc762 into go-zookeeper:master Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants