gddo-server: add global "Uses" links (alongside permalinks)
Each definition's "Uses" link points to the definition's page on
Sourcegraph, which shows where the definition is used (across all
indexed open-source repositories). This lets library users see "usage
examples" and gives library authors information about how their
library's API is being used.
It is necessary to store the value of go/doc.Func.Orig (the original
receiver name, see https://godoc.org/go/doc#Func.Orig) when building
documentation. Previously, only go/doc.Func.Recv (actual receiver
name) was stored. The original receiver name can differ from actual
due to struct embedding.
This change was originally submitted and OK'd by adg at
A gddo server with this change applied is temporarily available at
Reviewed-by: Andrew Gerrand <email@example.com>
5 files changed