Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 782 Bytes

documentation.md

File metadata and controls

39 lines (30 loc) · 782 Bytes

Overview

  • How to view docs from cli
  • How to view docs from browser
  • How to generate docs

Accessing doc from CLI

go doc regexp;
go doc -src regexp.Compile;
go doc -all regexp;
go doc -all http | grep -i tls;

Browser based documentation

  • godoc
  • Example: run local server
godoc -http=:6060 &

Idioms

  1. Every package should have a package comment
  2. Don't depend on spacing for alignment
  3. Every exported name should have a doc comment
  4. Use complete sentences
  5. First sentence should be a summary
  6. First sentence should begin with name of item described

Generating docs

TODO

Other Resources