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