Commit 47694b59 authored by Michael Matloob's avatar Michael Matloob
Browse files

[dev.cmdgo] cmd/go: provide a more helpful missing required module error in workspaces

If the user is in a workspace, they might not be in the main module
they need to run go get from to add a module that provides a missing
dependency. Figure out what that module is from the import stack (there
might be multiple but we pick according to the stack computed by
the loader for errors) and tell the user to cd to that directory
first in the message.

Change-Id: I7c919eb61ea3dd122334ff1acd2d7e817cad4b25
Reviewed-on: https://go-review.googlesource.com/c/go/+/334940


Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
parent 90830699
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment