aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/unit.go
diff options
context:
space:
mode:
authorJulie Qiu <julie@golang.org>2021-07-08 20:36:10 -0400
committerJulie Qiu <julie@golang.org>2021-07-19 14:07:06 +0000
commit8da574dede462d237b562d69823adca93f2bd02f (patch)
tree7cfb8b143229d511b57b185f90a7778b16451797 /internal/postgres/unit.go
parent7a15cb116a5b6aee7ee6f757e673384804661de7 (diff)
downloadgo-x-pkgsite-8da574dede462d237b562d69823adca93f2bd02f.tar.xz
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 <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'internal/postgres/unit.go')
-rw-r--r--internal/postgres/unit.go2
1 files changed, 1 insertions, 1 deletions
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 {