From 1896eac57f432478eb894ac5e10f91c4d08e4a3a Mon Sep 17 00:00:00 2001 From: cuiweixie Date: Thu, 29 Sep 2022 20:38:13 +0800 Subject: [PATCH] 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 Reviewed-by: Dmitri Shuralyov Run-TryBot: Ian Lance Taylor Reviewed-by: Ian Lance Taylor TryBot-Result: Gopher Robot --- src/cmd/go/internal/list/list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/go/internal/list/list.go b/src/cmd/go/internal/list/list.go index 66c33d9ade..b82d4b9e37 100644 --- a/src/cmd/go/internal/list/list.go +++ b/src/cmd/go/internal/list/list.go @@ -409,7 +409,7 @@ var nl = []byte{'\n'} 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 { -- 2.50.0