Skip to content

Commit

Permalink
[x/blog] content: documented godoc's "Deprecated:" convention in the …
Browse files Browse the repository at this point in the history
…godoc post

Fixes golang/go#10909

Change-Id: Ie2553bc2f6983cbcaf7398366c21dc175e1f5453
Reviewed-on: https://go-review.googlesource.com/18956
Reviewed-by: Rob Pike <r@golang.org>
X-Blog-Commit: 257114af91a0defb1fc2c16c7f4ae2429b8a4e0f
  • Loading branch information
passionSeven committed Jan 27, 2016
1 parent e848760 commit 6468784
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions blog/content/godoc-documenting-go-code.article
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ Comments that are not adjacent to a top-level declaration are omitted from godoc

// BUG(r): The rule Title uses for word boundaries does not handle Unicode punctuation properly.

Sometimes a struct field, function, type, or even a whole package becomes
redundant or unnecessary, but must be kept for compatibility with existing
programs.
To signal that an identifier should not be used, add a paragraph to its doc
comment that begins with "Deprecated:" followed by some information about the
deprecation.
There are a such few examples [[https://golang.org/search?q=deprecated][in the standard library]].

There are a few formatting rules that Godoc uses when converting comments to HTML:

- Subsequent lines of text are considered part of the same paragraph; you must leave a blank line to separate paragraphs.
Expand Down

0 comments on commit 6468784

Please sign in to comment.