x/pkgsite: support more name formats in symbol search #47841
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
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 of these results (other types with this method, including an interface definition).
 Except the ones on unexported types I suppose.
The text was updated successfully, but these errors were encountered: