From 8da574dede462d237b562d69823adca93f2bd02f Mon Sep 17 00:00:00 2001 From: Julie Qiu Date: Thu, 8 Jul 2021 20:36:10 -0400 Subject: internal/frontend: do not show symbol history for commands Since symbols don't appear in documentation for commands, also don't show its symbol history. For golang/go#37102 Change-Id: I09ad461ba12b91fc3bb7e6a314f35616e9668ba2 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/333379 Trust: Julie Qiu Run-TryBot: Julie Qiu Reviewed-by: Jonathan Amsterdam --- internal/postgres/unit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/postgres') diff --git a/internal/postgres/unit.go b/internal/postgres/unit.go index 2f7fccf9..756f3ad7 100644 --- a/internal/postgres/unit.go +++ b/internal/postgres/unit.go @@ -538,7 +538,7 @@ func (db *DB) getUnitWithAllFields(ctx context.Context, um *internal.UnitMeta, b u.Subdirectories = pkgs u.UnitMeta = *um - if um.IsPackage() && doc.Source != nil { + if um.IsPackage() && !um.IsCommand() && doc.Source != nil { if um.ModulePath == stdlib.ModulePath { u.SymbolHistory, err = GetSymbolHistoryForBuildContext(ctx, db.db, pathID, um.ModulePath, bcMatched) if err != nil { -- cgit v1.3-6-g1900