diff options
| author | Bryan C. Mills <bcmills@google.com> | 2022-04-18 13:12:43 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-04-20 15:44:57 +0000 |
| commit | 17f8d98a4adf8386e63a0d2902ff42ca5e80996e (patch) | |
| tree | fcc5f878c26c4d20a03c680d14986b59be5ed414 /src/net/http | |
| parent | cbc9e589053e7339c1e3c4d6e88c6c015792efce (diff) | |
| download | go-17f8d98a4adf8386e63a0d2902ff42ca5e80996e.tar.xz | |
go/internal/srcimporter: add context to cgo errors
An error message like "could not import os/user (exit status 1)"
(observed in https://go.dev/issue/52407) is fairly inscrutable.
On the other hand, srcimporter doesn't report errors with quite enough
structure to dump the entire stderr output from 'go tool cgo' without
potentially overwhelming the caller. Here, we split the difference by
describing which command failed but not printing the output of that
command.
For #52407, that would at least provide a stronger clue connecting
to #52408.
Change-Id: Iabdc95b17ba20a0f6ff38e5c7084e5081e1ef5e8
Reviewed-on: https://go-review.googlesource.com/c/go/+/400817
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/net/http')
0 files changed, 0 insertions, 0 deletions
