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 more comments to examples #100

Merged
merged 3 commits into from
Oct 25, 2023
Merged

Add more comments to examples #100

merged 3 commits into from
Oct 25, 2023

Conversation

akshayjshah
Copy link
Member

This PR attempts to make the GoDoc examples more of a guided tour: it makes the
comments more of a narrative walkthrough, and it moves them to the package
level (so they're displayed more prominently on pkg.go.dev).

Make the transcoder examples into package-level examples so they're a
little more prominent in pkg.go.dev. It also adds some more comments to
the examples, hopefully walking readers through what's happening a
little more slowly.
@akshayjshah akshayjshah requested a review from jhump October 25, 2023 05:04
if err != nil {
log.Println("error:", err)
log.Println(err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you intentionally not use logger here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope 🤦🏽 Thanks for the catch!

Copy link
Member

@jhump jhump left a comment

Choose a reason for hiding this comment

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

As Ed points out, the log variable was renamed logger (presumably to not conflict with imported package prefix), but many of the call sites were not actually updated. Aside from that, LGTM.

@akshayjshah akshayjshah merged commit f3683e5 into main Oct 25, 2023
4 checks passed
@akshayjshah akshayjshah deleted the ajs/examples branch October 25, 2023 17:40
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.

3 participants