“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.
Related:
bufio
examples https://pkg.go.dev/bufio#pkg-examplesbufio
examples test file https://cs.opensource.google/go/go/+/refs/tags/go1.17.7:src/bufio/example_test.goTags:
#godoc #go #tdd #examples #whygo