x/tools/go/gopackages: add Dir field to the Package struct #36730
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Currently, the
Package
struct does not have aDir
field, but instead there is aDir
field in theConfig
struct, specifying the directory in which to run the build system's query tool.With relative queries, like
.
or./...
it is possible to get a relative path to a .go source file.However with queries like
fmt
orgolang.org/x/time/rate
, the caller has no way to obtain relative file names.This may be a problem for some tools, like my https://github.com/perillo/goprint.
Showing something like
golang.org/x/time/rate ... /home/manlio/.local/lib/go/pkg/mod/golang.org/x/time@v0.0.0-20191024005414-555d28b269f0/rate/rate.go
instead ofgolang.org/x/time/rate ... rate.go
on the page top header is a bit problematic.The text was updated successfully, but these errors were encountered: