Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In Go the example code is (can be) part of the source as well, and shown as executable in the documentation viewer: https://blog.golang.org/examples


Arguably another feature that could use some shouting from the rooftops. I see it fairly rarely from public packages, and it's something a lot of public packages really ought to have. Little example snippets for specific functions are great, but round-trip, top-to-bottom examples of using your code base are very useful.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: