TIL Testable Examples in Go

“Godoc examples are snippets of Go code that are displayed as package documentation and that are verified by running them as tests. They can also be run by a user visiting the godoc web page for the package and clicking the associated ‘Run’ button.”

To see the results, please refer to the package bufio reference below.



#godoc #go #tdd #examples #whygo