]> Cypherpunks repositories - gostls13.git/commit
cmd/go: improve wording of 'go mod init' error
authorJay Conrod <jayconrod@google.com>
Fri, 8 Mar 2019 20:25:11 +0000 (15:25 -0500)
committerJay Conrod <jayconrod@google.com>
Fri, 8 Mar 2019 23:42:22 +0000 (23:42 +0000)
commit91c9ed084096b105858ab13a3c26925d82592d56
treea1c88a794cd1eb4719927eca13fec5a18dd89376
parent0271d41ed63cacd1d79716161d0797790e930dfa
cmd/go: improve wording of 'go mod init' error

When 'go mod init' is run without a module path, it tries to infer a
module path, based on the current directory (if in GOPATH), import
comments, and vendor configuration files.

It's common for this command to fail the first time a user tries to
create a module in a new project outside GOPATH. This change improves
the wording of the error message to hint that the user should specify
a module path.

Fixes #30678

Change-Id: Iec0352e919dbc8b426ab71eed236fad3929ec671
Reviewed-on: https://go-review.googlesource.com/c/go/+/166319
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/go/internal/modload/init.go