golang/go
View on GitHubcmd/go: mod why -m is not strict when parsing an import path
Open
#36,658 opened on Jan 20, 2020
GoCommandNeedsFixhelp wantedmodules
Repository metrics
- Stars
- (133,883 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
What version of Go are you using (go version)?
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
What did you do?
In a project that depends on golang.org/x/tools/go/packages, I executed
go mod why -m golang.org/x/tools/
What did you expect to see?
go: malformed import path "golang.org/x/tools/": trailing slash
as it is done by go mod init.
What did you see instead?
# golang.org/x/tools/
(main module does not need module golang.org/x/tools/)