Commit graph

5 commits

Author SHA1 Message Date
Dave Collins
1c877b33ea Use magic syntax for godoc NewestSha example. 2014-07-08 10:04:03 -05:00
Dave Collins
4422b14f63 Categorize NewestSha example under Db interface.
It seems the godoc example extraction does not recognize the same syntax
used for functions with receivers when working with interfaces.

So, instead, categorize the example on the interface.
2014-07-08 09:27:13 -05:00
Dave Collins
05ff5bd8ec Add NewestSha example. 2014-07-08 09:10:14 -05:00
Dave Collins
a12b62c24c Add commented imports to the example. 2014-07-08 08:50:12 -05:00
Dave Collins
9ed908f44a Use testable example and update README.md.
This commit moves the example to a test file so it integrates nicely with
Go's example tooling.

This allows the example output to be tested as a part of running the
normal Go tests to help ensure it doesn't get out of date with the code.
It is also nice to have the example in one place rather than repeating it
in doc.go and README.md.

Links and information about the example have been included in README.md in
place of the example.
2014-07-08 08:47:18 -05:00