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

Add instructions on using NewClient in its Godoc docblock #6

Merged
merged 1 commit into from
Nov 11, 2023

Conversation

brandur
Copy link
Contributor

@brandur brandur commented Nov 11, 2023

There's an example at the top of the River package demonstrating the use
of NewClient, but as I was reading the docs today, I realized that
since NewClient is somewhat non-trivial to invoke because it requires
a generic parameter, it'd be a good idea to also have an example of its
use right in NewClient's docblock. That way, if a user is viewing this
function they don't need to go hunt around for examples to try and
figure out how to use it.

@brandur brandur requested a review from bgentry November 11, 2023 01:40
@brandur brandur force-pushed the brandur-client-example branch from 96ee725 to 76fddf9 Compare November 11, 2023 02:07
Copy link
Contributor

@bgentry bgentry left a comment

Choose a reason for hiding this comment

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

Nice little improvement 👏 :shipit:

There's an example at the top of the River package demonstrating the use
of `NewClient`, but as I was reading the docs today, I realized that
since `NewClient` is somewhat non-trivial to invoke because it requires
a generic parameter, it'd be a good idea to also have an example of its
use right in `NewClient`'s docblock. That way, if a user is viewing this
function they don't need to go hunt around for examples to try and
figure out how to use it.
@brandur brandur force-pushed the brandur-client-example branch from 76fddf9 to eaedfca Compare November 11, 2023 02:44
@brandur
Copy link
Contributor Author

brandur commented Nov 11, 2023

Thx!

@brandur brandur merged commit 0776d75 into master Nov 11, 2023
5 checks passed
@brandur brandur deleted the brandur-client-example branch November 11, 2023 02:47
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