diff options
| author | Jonathan Amsterdam <jba@google.com> | 2020-11-23 17:39:43 -0500 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2020-11-24 17:53:21 +0000 |
| commit | 2d9c3b5071bc2919f5bbc2c4bedb8be76101f82d (patch) | |
| tree | 81a879a88b76fe524f03658e12c7357737b3ed9a /internal/postgres/unit.go | |
| parent | 451cdd32608cfc9e82b18188b0179a84ee7d06d2 (diff) | |
| download | go-x-pkgsite-2d9c3b5071bc2919f5bbc2c4bedb8be76101f82d.tar.xz | |
many: remove Documentation.HTML
HTML is always generated from source, so the Documentation.HTML field
is no longer necessary.
Change-Id: I13cddbfbd983c8a2ff0cb9389e854887caadcc13
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/272509
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'internal/postgres/unit.go')
| -rw-r--r-- | internal/postgres/unit.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/internal/postgres/unit.go b/internal/postgres/unit.go index 1abe909f..2c794020 100644 --- a/internal/postgres/unit.go +++ b/internal/postgres/unit.go @@ -225,15 +225,13 @@ func (db *DB) getDocumentation(ctx context.Context, unitID int) (_ *internal.Doc defer derrors.Wrap(&err, "getDocumentation(ctx, %d)", unitID) defer middleware.ElapsedStat(ctx, "getDocumentation")() var ( - doc internal.Documentation - docHTML string + doc internal.Documentation ) err = db.db.QueryRow(ctx, ` SELECT d.goos, d.goarch, d.synopsis, - d.html, d.source FROM documentation d WHERE @@ -241,14 +239,12 @@ func (db *DB) getDocumentation(ctx context.Context, unitID int) (_ *internal.Doc database.NullIsEmpty(&doc.GOOS), database.NullIsEmpty(&doc.GOARCH), database.NullIsEmpty(&doc.Synopsis), - database.NullIsEmpty(&docHTML), &doc.Source, ) switch err { case sql.ErrNoRows: return nil, derrors.NotFound case nil: - doc.HTML = convertDocumentation(docHTML) return &doc, nil default: return nil, err |
