google/go-github — pull request #114 by shurcooL (2014-06-05 05:32:27+00:00)
Title: Change markdown example to be an Example (with expected output).

This way, the output of this example program can be seen simply by looking at its source code. This is convenient for users who haven't downloaded the library yet, or don't have a Go installation at hand,
and simply want to see what the output would be.

It also makes it into a test. I imagine it should be fairly stable and not break over time, but it is possible if GitHub changes their rendering. The test would have to be updated in that case.

Finally, the test may or may not pass the Travis tests. We shall find out soon. If not, it can be disabled by adding a build tag. ***Update:*** Actually, I don't think the current Travis script will run tests in ./examples/ folder.