summaryrefslogtreecommitdiffhomepage
path: root/tools/go_stateify/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'tools/go_stateify/main.go')
-rw-r--r--tools/go_stateify/main.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/tools/go_stateify/main.go b/tools/go_stateify/main.go
index 47c8ea1d7..7d5d291e6 100644
--- a/tools/go_stateify/main.go
+++ b/tools/go_stateify/main.go
@@ -90,8 +90,9 @@ func matchtag(tag string, goarch string) bool {
return tag == goarch
}
-// canBuild reports whether we can build this file for target platform by checking file name and build tags.
-// The code is derived from the Go source cmd.dist.build.shouldbuild.
+// canBuild reports whether we can build this file for target platform by
+// checking file name and build tags. The code is derived from the Go source
+// cmd.dist.build.shouldbuild.
func canBuild(file, goTargetArch string) bool {
name := filepath.Base(file)
excluded := func(list []string, ok string) bool {
@@ -120,11 +121,6 @@ func canBuild(file, goTargetArch string) bool {
if p == "" {
continue
}
- code := p
- i := strings.Index(code, "//")
- if i > 0 {
- code = strings.TrimSpace(code[:i])
- }
if !strings.HasPrefix(p, "//") {
break
}