sdk-go icon indicating copy to clipboard operation
sdk-go copied to clipboard

Move examples from README.md to godoc

Open alanconway opened this issue 6 years ago • 2 comments

Go supports testable examples https://blog.golang.org/examples. They have important advantages over README examples.

  1. more visible - the examples end up in the package godoc, where they are more likely to be found by package users.
  2. better tested - examples become tests, run by "go test". Immediate warning if a change breaks an example, and as a bonus it counts to test coverage.

alanconway avatar Jul 04 '19 18:07 alanconway

Cool idea!!!

I have not really known how to get the examples in shape. Want to migrate one and see what it looks like and show the path?

n3wscott avatar Jul 10 '19 14:07 n3wscott

Will do.

alanconway avatar Jul 11 '19 20:07 alanconway