From: 180909 <734461790@qq.com> Date: Mon, 16 Aug 2021 06:07:39 +0000 (+0000) Subject: cmd/go: add document -json in testflag X-Git-Tag: go1.18beta1~1752 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=446614182202a57b84c2742c8992c552e5fc7d3b;p=gostls13.git cmd/go: add document -json in testflag Fixes #47628 Change-Id: I2776fbc22d8a73ca7adc2cf7ad85669d57cc7eae GitHub-Last-Rev: 826907b0797cdc25f921117e2ee44fc0dc2d21c3 GitHub-Pull-Request: golang/go#47683 Reviewed-on: https://go-review.googlesource.com/c/go/+/341991 Run-TryBot: Jay Conrod TryBot-Result: Go Bot Reviewed-by: Jay Conrod Reviewed-by: Michael Matloob --- diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index 7f88d3216c..f919699627 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -2658,6 +2658,10 @@ // -failfast // Do not start new tests after the first test failure. // +// -json +// Log verbose output and test results in JSON. This presents the +// same information as the -v flag in a machine-readable format. +// // -list regexp // List tests, benchmarks, or examples matching the regular expression. // No tests, benchmarks or examples will be run. This will only diff --git a/src/cmd/go/internal/test/test.go b/src/cmd/go/internal/test/test.go index aeba80eb68..ce8f226a96 100644 --- a/src/cmd/go/internal/test/test.go +++ b/src/cmd/go/internal/test/test.go @@ -242,6 +242,10 @@ control the execution of any test: -failfast Do not start new tests after the first test failure. + -json + Log verbose output and test results in JSON. This presents the + same information as the -v flag in a machine-readable format. + -list regexp List tests, benchmarks, or examples matching the regular expression. No tests, benchmarks or examples will be run. This will only