-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: go test panic in vendoredImportPath #14613
Labels
Milestone
Comments
CL https://golang.org/cl/21596 mentions this issue. |
CL https://golang.org/cl/22051 mentions this issue. |
gopherbot
pushed a commit
that referenced
this issue
Apr 14, 2016
Fixes #14613 Change-Id: I40d9696db3879549e78373ef17f6c92bd4b3470b Reviewed-on: https://go-review.googlesource.com/21596 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/22051 Run-TryBot: Andrew Gerrand <adg@golang.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
go1.6 centos7
file:
src/vendor/mylibtesttest/myapp/myapp_test.go
file:
src/vendor/mylibtesttest/rds/rds.go
In
src/vendor/mylibtesttest/myapp/
1.
go test
go test myapp_test.go
In
src/cmd/go/pkg.go
functionvendoredImportPath
When we use "go test myapp_test.go", parent.ImportPath is "command-line-arguments", and it will panic in
return parent.ImportPath[:len(parent.ImportPath)-chopped] + "/" + vpath
, because oflen(parent.ImportPath)-chopped < 0
I add some code to fix this.
The text was updated successfully, but these errors were encountered: