]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go/internal/list: should omit comparison to bool constant
authorcuiweixie <cuiweixie@gmail.com>
Thu, 29 Sep 2022 12:38:13 +0000 (20:38 +0800)
committerGopher Robot <gobot@golang.org>
Thu, 29 Sep 2022 23:48:46 +0000 (23:48 +0000)
Change-Id: Ieef05be39bad1263eacedb33c2043ee83080f629
Reviewed-on: https://go-review.googlesource.com/c/go/+/436697
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/go/internal/list/list.go

index 66c33d9adefae8c93dfc727e60d58c283a504743..b82d4b9e3768c1e15b3727f26874a477c7f0cab7 100644 (file)
@@ -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 {