Skip to content

Commit

Permalink
Update 2018-07-26-gonotes.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pokstad authored Jul 25, 2018
1 parent eb20092 commit 5de55d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _drafts/2018-07-26-gonotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ tags: [software, golang, gonotes]

When writing code, an abundance of documentation is always welcome to guide future readers and contributors (which includes yourself). Documentation is so important in Go, that the language was designed with a standardized approach to writing good code comments that could be autogenerated into documentation (see the [Go team's official blog post on documentation](https://blog.golang.org/godoc-documenting-go-code)).

There are amazing tools that expose the power of Go documentation, such as [godoc](https://godoc.org/golang.org/x/tools/cmd/godoc). At the heart of godoc, is a simple package in the standard library called [doc](https://golang.org/pkg/go/doc). Doc contains a set of standard conventions for interacting with Go documentation. This may include how code comments should be formatted into HTML.
There are amazing tools that expose the power of Go documentation, such as [godoc](https://godoc.org/golang.org/x/tools/cmd/godoc). At the heart of godoc, is a simple package in the standard library called [doc](https://golang.org/pkg/go/doc). Doc contains a set of standard conventions for interacting with Go documentation. For example, the library includes a [standard formatter for how code comments should be formatted into HTML](). This includes formatting headers, code blocks, and paragraphs. The simplicity and standardized way of approaching the formatting of comments means that it is trivial for IDE's, text editors, and other developer tools to take advantage of displaying comments to the user in a consistent way.

Gomate, a side project of mine that provides Textmate extensions for working with Go code, utilizes the standardized rendering of HTML code for displaying symbol documentation.

0 comments on commit 5de55d3

Please sign in to comment.