golang/go

cmd/go: mod why -m is not strict when parsing an import path

Open

#36.658 aperta il 20 gen 2020

Vedi su GitHub
 (1 commento) (1 reazione) (0 assegnatari)Go (19.008 fork)batch import
GoCommandNeedsFixhelp wantedmodules

Metriche repository

Star
 (133.883 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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/)

Guida contributor