Skip to content

Commit

Permalink
_content/doc/comment: document form of directive comments
Browse files Browse the repository at this point in the history
Fixes golang/go#43776.

Change-Id: I3e18dbe5dfb0bca96a16203efd4c2a92636cf412
Reviewed-on: https://go-review.googlesource.com/c/website/+/442516
Run-TryBot: Russ Cox <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
rsc committed Nov 2, 2022
1 parent 3c8a101 commit de15dbe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions _content/doc/comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,11 @@ For example:
//go:generate stringer -type Op -trimprefix Op
type Op uint8

A directive comment is a line matching the regular expression
`//(line |extern |export |[a-z0-9]+:[a-z0-9])`.
Tools that define their own directives should use the form
`//toolname:directive`.

Gofmt removes leading and trailing blank lines in doc comments.

### Paragraphs {#paragraphs}
Expand Down

0 comments on commit de15dbe

Please sign in to comment.