[go] cmd/go/internal/list: should omit comparison to bool constant

26 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Sep 29, 2022, 7:48:49 PM9/29/22
to xie cui, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Dmitri Shuralyov, Dmitri Shuralyov, Bryan Mills, Michael Matloob, Russ Cox, Ian Lance Taylor, golang-co...@googlegroups.com

Gopher Robot submitted this change.

View Change


Approvals: Ian Lance Taylor: Looks good to me, approved; Run TryBots; Automatically submit change Gopher Robot: TryBots succeeded Dmitri Shuralyov: Looks good to me, but someone else must approve
cmd/go/internal/list: should omit comparison to bool constant

Change-Id: Ieef05be39bad1263eacedb33c2043ee83080f629
Reviewed-on: https://go-review.googlesource.com/c/go/+/436697
Auto-Submit: Ian Lance Taylor <ia...@google.com>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Run-TryBot: Ian Lance Taylor <ia...@google.com>
Reviewed-by: Ian Lance Taylor <ia...@google.com>
TryBot-Result: Gopher Robot <go...@golang.org>
---
M src/cmd/go/internal/list/list.go
1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/src/cmd/go/internal/list/list.go b/src/cmd/go/internal/list/list.go
index 66c33d9..b82d4b9 100644
--- a/src/cmd/go/internal/list/list.go
+++ b/src/cmd/go/internal/list/list.go
@@ -409,7 +409,7 @@
func runList(ctx context.Context, cmd *base.Command, args []string) {
modload.InitWorkfile()

- if *listFmt != "" && listJson == true {
+ if *listFmt != "" && listJson {
base.Fatalf("go list -f cannot be used with -json")
}
if *listReuse != "" && !*listM {

To view, visit change 436697. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ieef05be39bad1263eacedb33c2043ee83080f629
Gerrit-Change-Number: 436697
Gerrit-PatchSet: 2
Gerrit-Owner: xie cui <5235...@qq.com>
Gerrit-Reviewer: Bryan Mills <bcm...@google.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Ian Lance Taylor <ia...@google.com>
Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
Gerrit-CC: Russ Cox <r...@golang.org>
Gerrit-MessageType: merged
Reply all
Reply to author
Forward
0 new messages