Skip to content

Commit

Permalink
content: documented godoc's "Deprecated:" convention in the godoc post
Browse files Browse the repository at this point in the history
Fixes golang/go#10909

Change-Id: Ie2553bc2f6983cbcaf7398366c21dc175e1f5453
Reviewed-on: https://go-review.googlesource.com/18956
Reviewed-by: Rob Pike <r@golang.org>
  • Loading branch information
adg committed Jan 27, 2016
1 parent 53068e1 commit 257114a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions 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 257114a

Please sign in to comment.