x/pkgsite: support more name formats in symbol search #47841
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
pkgsite/search
Issues related to pkg.go.dev search functionality
pkgsite
Milestone
What is the URL of the page with the issue?
What is your user agent?
Mozilla/5.0 (X11; CrOS x86_64 13982.69.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.130 Safari/537.36
Screenshot
What did you do?
Search for functions named "CopyInBytes".
What did you expect to see?
Functions and methods named "CopyInBytes".
What did you see instead?
Nothing. There is no function named CopyInBytes, only methods. Searching for Task.CopyInBytes works, but it would be nice to support more flexibility in the way of searching.
There are two dimensions to this:
This method has a pointer receiver, so the actual name is (*Task).CopyInBytes, but that doesn't return any results. It should also be possible to use the fully qualified symbol name using the package path: gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).CopyInBytes
I think both of these are particularly important for searching for symbols copied directly from a Go stacktrace, which will have this format.
I may not remember the type name, so it would be nice to be able to search for just the method name: CopyInBytes. I would expect that to include all[1] of these results (other types with this method, including an interface definition).
[1] Except the ones on unexported types I suppose.
The text was updated successfully, but these errors were encountered: