From: cuiweixie Date: Thu, 29 Sep 2022 12:38:13 +0000 (+0800) Subject: cmd/go/internal/list: should omit comparison to bool constant X-Git-Tag: go1.20rc1~805 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1896eac57f432478eb894ac5e10f91c4d08e4a3a;p=gostls13.git 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 --- 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 {