1
0
mirror of https://github.com/golang/go synced 2024-11-17 21:04:43 -07:00

cmd/go/internal/modindex: should omit comparison to bool constant

Change-Id: Iea75d0475e1cc8f794a7bae864c6ce0e6e33cb6c
Reviewed-on: https://go-review.googlesource.com/c/go/+/436698
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
cuiweixie 2022-09-29 20:40:44 +08:00 committed by Gopher Robot
parent 1896eac57f
commit 2fedd335f0

View File

@ -769,7 +769,7 @@ func shouldBuild(sf *sourceFile, tags map[string]bool) bool {
plusBuildConstraints := sf.plusBuildConstraints() plusBuildConstraints := sf.plusBuildConstraints()
for _, text := range plusBuildConstraints { for _, text := range plusBuildConstraints {
if x, err := constraint.Parse(text); err == nil { if x, err := constraint.Parse(text); err == nil {
if imports.Eval(x, tags, true) == false { if !imports.Eval(x, tags, true) {
return false return false
} }
} }