]> Cypherpunks repositories - gostls13.git/commit
cmd/go: report a helpful error when there are no modules in workspace
authorMichael Matloob <matloob@golang.org>
Fri, 19 Nov 2021 21:09:52 +0000 (16:09 -0500)
committerMichael Matloob <matloob@golang.org>
Mon, 22 Nov 2021 16:53:57 +0000 (16:53 +0000)
commitcd0bf3896677583074d33af0b9e538f237db5394
treed83a49132d26d3d4562b9323644717f7cc9189c0
parent6275b54a2a58a1a1bed7f2cc3bc92eca5affb8ff
cmd/go: report a helpful error when there are no modules in workspace

The current error message that no go.mod files were found is not
helpful, especially when a go.mod file exists in the current directory.

Fixes #49594

Change-Id: I750475ce8654eeb3e0a2857d5a2de1a9c6ede415
Reviewed-on: https://go-review.googlesource.com/c/go/+/365319
Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/alldocs.go
src/cmd/go/internal/modload/init.go
src/cmd/go/internal/workcmd/work.go
src/cmd/go/testdata/script/work_build_no_modules.txt [new file with mode: 0644]