]> Cypherpunks repositories - gostls13.git/commit
cmd/go: implement "go build -json"
authorAustin Clements <austin@google.com>
Thu, 24 Aug 2023 17:29:39 +0000 (13:29 -0400)
committerAustin Clements <austin@google.com>
Sun, 17 Nov 2024 14:31:57 +0000 (14:31 +0000)
commit7020759859a3b7c2f033e497eca750b15d3aa38d
treec171ee903110c9f952db048162b04e6d469e0023
parent47da5a303f642c7c863e0fe9a5554fb85dd45d68
cmd/go: implement "go build -json"

This adds support for a "-json" flag in all build-related go
subcommands. This causes build output and build failures to be
reported to stdout in a machine-readable way.

For #62067.
Fixes #23037.

Change-Id: Id045c5bd5dde9d16cc09dde6248a4b9637896a30
Reviewed-on: https://go-review.googlesource.com/c/go/+/536397
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Russ Cox <rsc@golang.org>
14 files changed:
src/cmd/go/alldocs.go
src/cmd/go/internal/cfg/cfg.go
src/cmd/go/internal/clean/clean.go
src/cmd/go/internal/fix/fix.go
src/cmd/go/internal/generate/generate.go
src/cmd/go/internal/help/helpdoc.go
src/cmd/go/internal/list/list.go
src/cmd/go/internal/load/printer.go
src/cmd/go/internal/test/testflag.go
src/cmd/go/internal/vet/vetflag.go
src/cmd/go/internal/work/action.go
src/cmd/go/internal/work/build.go
src/cmd/go/main.go
src/cmd/go/testdata/script/build_json.txt [new file with mode: 0644]