Skip to content

Commit de15dbe

Browse files
committedNov 2, 2022
_content/doc/comment: document form of directive comments
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]>
1 parent 3c8a101 commit de15dbe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎_content/doc/comment.md

+5
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,11 @@ For example:
490490
//go:generate stringer -type Op -trimprefix Op
491491
type Op uint8
492492

493+
A directive comment is a line matching the regular expression
494+
`//(line |extern |export |[a-z0-9]+:[a-z0-9])`.
495+
Tools that define their own directives should use the form
496+
`//toolname:directive`.
497+
493498
Gofmt removes leading and trailing blank lines in doc comments.
494499

495500
### Paragraphs {#paragraphs}

0 commit comments

Comments
 (0)
Please sign in to comment.