mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-05 16:47:27 -04:00
all: add missing //go:build comments
These were apparently overlooked in CL 357329, CL 294490, CL 296889, and other various updates to this module. (I noticed them via gopls while investigating golang/go#49466.) Updates golang/go#41184 Change-Id: Id042bb6fe5282e6d528e9315acf2ad29d0df58ba Reviewed-on: https://go-review.googlesource.com/c/sys/+/362577 Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
+9
-2
@@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
/*
|
||||
@@ -49,7 +50,12 @@ func cmdLine() string {
|
||||
return "go run mksyscall.go " + strings.Join(os.Args[1:], " ")
|
||||
}
|
||||
|
||||
// buildTags returns build tags
|
||||
// goBuildTags returns build tags in the go:build format.
|
||||
func goBuildTags() string {
|
||||
return strings.ReplaceAll(*tags, ",", " && ")
|
||||
}
|
||||
|
||||
// plusBuildTags returns build tags in the +build format.
|
||||
func buildTags() string {
|
||||
return *tags
|
||||
}
|
||||
@@ -377,12 +383,13 @@ func main() {
|
||||
}
|
||||
file.Close()
|
||||
}
|
||||
fmt.Printf(srcTemplate, cmdLine(), buildTags(), text)
|
||||
fmt.Printf(srcTemplate, cmdLine(), goBuildTags(), plusBuildTags(), text)
|
||||
}
|
||||
|
||||
const srcTemplate = `// %s
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build %s
|
||||
// +build %s
|
||||
|
||||
package plan9
|
||||
|
||||
Reference in New Issue
Block a user