aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres
diff options
context:
space:
mode:
authorJulie Qiu <julie@golang.org>2021-05-05 20:28:16 -0400
committerJulie Qiu <julie@golang.org>2021-05-06 17:43:23 +0000
commit5eed0f6bc950ef849537ae0634849e8e48e683c9 (patch)
treef41eb319dfa59384abe89cbdc416c3094edcd7b0 /internal/postgres
parent4e95d3e1ae115221102ced713bbd139cfe4e3c98 (diff)
downloadgo-x-pkgsite-5eed0f6bc950ef849537ae0634849e8e48e683c9.tar.xz
internal/frontend: support displaying multiple of same type
Previously on the versions page, we were not handling the case when different identifiers are added for the same type for different build contexts, and which build context was surfaced was based on chance. To support this case, it is now possible to show multiple of the same type at the same version. For example, https://pkg.go.dev/internal/poll?tab=versions at go1.10 will show: ``` type FD — windows/amd64 + func (fd *FD) ReadMsg(p []byte, oob []byte) (int, int, int, syscall.Sockaddr, error) + func (fd *FD) WriteMsg(p []byte, oob []byte, sa syscall.Sockaddr) (int, int, error) type FD — darwin/amd64, linux/amd64 + func (fd *FD) SetBlocking() error + func (fd *FD) WriteOnce(p []byte) (int, error) ``` For golang/go#37102 Change-Id: I19e6ef12f1f8f9c412aab7cea2782409eecf29f9 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/317489 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'internal/postgres')
-rw-r--r--internal/postgres/symbol_history.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/postgres/symbol_history.go b/internal/postgres/symbol_history.go
index 252bceeb..571769ea 100644
--- a/internal/postgres/symbol_history.go
+++ b/internal/postgres/symbol_history.go
@@ -93,8 +93,8 @@ func GetSymbolHistoryWithPackageSymbols(ctx context.Context, ddb *database.DB,
// children names are also tracked.
func GetSymbolHistoryForBuildContext(ctx context.Context, ddb *database.DB, pathID int, modulePath string,
bc internal.BuildContext) (_ map[string]string, err error) {
- defer derrors.WrapStack(&err, "getSymbolHistoryForBuildContext(ctx, ddb, %d, %q)", pathID, modulePath)
- defer middleware.ElapsedStat(ctx, "getSymbolHistoryForBuildContext")()
+ defer derrors.WrapStack(&err, "GetSymbolHistoryForBuildContext(ctx, ddb, %d, %q)", pathID, modulePath)
+ defer middleware.ElapsedStat(ctx, "GetSymbolHistoryForBuildContext")()
if bc == internal.BuildContextAll {
bc = internal.BuildContextLinux