mirror of https://github.com/golang/go.git
For import "a/bar/foo" the existing code just decides the last component is the package name. But for import "a/bar/v2" this is incorrect, as the packge name is 'bar'. The new code uses the result of parsing to derive the package name from the import string. That is, the package name was determined syntactically, it is now determined semantically. Fixes https://golang.org/issue/47784 Change-Id: Iccdd25e7e3f591e6514b1e0258e9e1879af9ff2d Reviewed-on: https://go-review.googlesource.com/c/tools/+/343909 Trust: Peter Weinberger <pjw@google.com> Run-TryBot: Peter Weinberger <pjw@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> |
||
|---|---|---|
| .. | ||
| README.md | ||
| a.go | ||
| a.go.golden | ||
| b.go | ||
| b.go.golden | ||
| semantic_test.go | ||
README.md
The golden files are the output of gopls semtok <src-file>, with -- semantic --
inserted as the first line (the spaces are mandatory) and an extra newline at the end.