-
Exported identifier (akin to public access modifier) begins with capital letter, eg:
Foobar(). -
Internal identifier (akin to private access modifier) begins with small letter, eg:
foobar().
Identifer means variable name, function name, constant, statement labels, package name, or types.
MixedCaps or mixedCaps rather than underscores to write multiword names.
Formatting rules by official Go doc:
- Subsequent lines of text are considered part of the same paragraph; you must leave a blank line to separate paragraphs.
- Pre-formatted text must be indented relative to the surrounding comment text (see gob’s doc.go for an example).
- URLs will be converted to HTML links; no special markup is necessary.
- Official Go Documentation
- An Introduction to Programming in Go by Caleb Doxsey
- Note: This open source version was released in 2012, hence there might be some functions that have been deprecated but I think it's good enough to get yourself started on familiarising with Go's concept.