Skip to content

Commit 257114a

Browse files
committed
content: documented godoc's "Deprecated:" convention in the godoc post
Fixes golang/go#10909 Change-Id: Ie2553bc2f6983cbcaf7398366c21dc175e1f5453 Reviewed-on: https://go-review.googlesource.com/18956 Reviewed-by: Rob Pike <[email protected]>
1 parent 53068e1 commit 257114a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

content/godoc-documenting-go-code.article

+8
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ Comments that are not adjacent to a top-level declaration are omitted from godoc
3737

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

40+
Sometimes a struct field, function, type, or even a whole package becomes
41+
redundant or unnecessary, but must be kept for compatibility with existing
42+
programs.
43+
To signal that an identifier should not be used, add a paragraph to its doc
44+
comment that begins with "Deprecated:" followed by some information about the
45+
deprecation.
46+
There are a such few examples [[https://golang.org/search?q=deprecated][in the standard library]].
47+
4048
There are a few formatting rules that Godoc uses when converting comments to HTML:
4149

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

0 commit comments

Comments
 (0)