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

Make log examples proper godoc examples #47

Open
camscale opened this issue Apr 22, 2020 · 0 comments
Open

Make log examples proper godoc examples #47

camscale opened this issue Apr 22, 2020 · 0 comments

Comments

@camscale
Copy link
Contributor

The directory log/_examples contains a main program that uses many (all?) of the features of the log package, and includes a lot of code comments. Those code comments are more detailed/verbose than any of the godocs from what I can see. Additionally, godocs support testable examples that appear in the docs and can be run directly from the docs - see https://blog.golang.org/examples for details.

Rework the examples in log/_examples to be godoc examples.

When done, remove the target from the Makefile that builds the examples, as go test will then build and run the examples.

This will also help by making many smaller targeted examples, rather than one or two big ones that does a bit of everything but does not make a lot of sense together.

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

No branches or pull requests

1 participant