Skip to content

Commit 04a8801

Browse files
Extend known for Go 1.24 compiler directives (#3)
Co-authored-by: Leigh McCulloch <[email protected]>
1 parent d4f4c01 commit 04a8801

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

checkcompilerdirectives/checkcompilerdirectives.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,11 @@ func isKnown(directive string) bool {
7272
return false
7373
}
7474

75+
// Found by running the following command on the source of go.
76+
// git grep -o -E -h '//go:[a-z_-]+' -- ':!**/*_test.go' ':!test/' ':!**/testdata/**' | sort -u
77+
// See https://pkg.go.dev/cmd/[email protected]#hdr-Compiler_Directives
7578
var known = []string{
76-
// Found by running the following command on the source of go.
77-
// git grep -o -E -h '//go:[a-z_]+' -- ':!**/*_test.go' ':!test/' ':!**/testdata/**' | sort -u
78-
"binary",
7979
"build",
80-
"buildsomethingelse",
8180
"cgo_dynamic_linker",
8281
"cgo_export_dynamic",
8382
"cgo_export_static",
@@ -89,7 +88,6 @@ var known = []string{
8988
"embed",
9089
"generate",
9190
"linkname",
92-
"name",
9391
"nocheckptr",
9492
"noescape",
9593
"noinline",
@@ -102,5 +100,7 @@ var known = []string{
102100
"systemstack",
103101
"uintptrescapes",
104102
"uintptrkeepalive",
103+
"wasmimport",
104+
"wasmexport",
105105
"yeswritebarrierrec",
106106
}

0 commit comments

Comments
 (0)