Commit 9c623f72 authored by Bryan C. Mills's avatar Bryan C. Mills

cmd/go: test 'go get' and 'go install' with an (invalid) module ending in /v1

We expect major version v1 to not have a /v1 suffix.
(Such a suffix on the package path is fine, but not on the module path.)

Fixes #26375

Change-Id: I4206ded82ede36440cedfaf39875c38b9c95dc27
Reviewed-on: https://go-review.googlesource.com/c/153823
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: default avatarRuss Cox <rsc@golang.org>
Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
parent 7d9649bf
example.com/invalidpath/v1 v1.0.0
written by hand
-- .mod --
module example.com/invalidpath/v1
-- .info --
{"Version":"v1.0.0"}
-- go.mod --
module example.com/invalidpath/v1
-- version.go --
package version
const V = "v1.0.0"
env GO111MODULE=on
! go get -m example.com/invalidpath/v1
! go install .
-- go.mod --
module example.com
-- main.go --
package main
import _ "example.com/invalidpath/v1"
func main() {}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment