diff options
| author | Julie Qiu <julie@golang.org> | 2021-07-08 20:36:10 -0400 |
|---|---|---|
| committer | Julie Qiu <julie@golang.org> | 2021-07-19 14:07:06 +0000 |
| commit | 8da574dede462d237b562d69823adca93f2bd02f (patch) | |
| tree | 7cfb8b143229d511b57b185f90a7778b16451797 /internal/postgres | |
| parent | 7a15cb116a5b6aee7ee6f757e673384804661de7 (diff) | |
| download | go-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')
| -rw-r--r-- | internal/postgres/unit.go | 2 |
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 { |
