x/tools/cmd/guru: definition doesn't look up the function references in the same package if modules are enabled #31720
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
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
)?go env
OutputWhat did you do?
Given the files
a.go
andb.go
defined in the same package,guru definition
isn't able to find the method that is defined in the same package but in different file if go.mod is present and the project is outside of GOPATH.a.go
b.go
Then with if the files are in the
$GOPATH/src/test/guru_mod_files/a/
the commandreturns
however if the package is moved out of $GOPATH, then it doesn't work as expected:
What did you expect to see?
Proper function definition from the other file in the same package.
What did you see instead?
guru: no object for identifier
The text was updated successfully, but these errors were encountered: