From 446614182202a57b84c2742c8992c552e5fc7d3b Mon Sep 17 00:00:00 2001 From: 180909 <734461790@qq.com> Date: Mon, 16 Aug 2021 06:07:39 +0000 Subject: [PATCH] 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 --- src/cmd/go/alldocs.go | 4 ++++ src/cmd/go/internal/test/test.go | 4 ++++ 2 files changed, 8 insertions(+) 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 -- 2.50.0