diff options
| author | Julie Qiu <julie@golang.org> | 2021-02-10 16:20:12 -0500 |
|---|---|---|
| committer | Julie Qiu <julie@golang.org> | 2021-02-12 21:27:40 +0000 |
| commit | 56e2739dab2f9dfa97556cebf5f8f942119bd63f (patch) | |
| tree | 1fe1d6acf9a251e932d854b144b0a0f4847f1b76 /internal/testing/sample | |
| parent | 37297aab29d49c37f191e047dec51ce381b74180 (diff) | |
| download | go-x-pkgsite-56e2739dab2f9dfa97556cebf5f8f942119bd63f.tar.xz | |
internal/postgres: insert symbol names
Insert symbol names into the symbols table when package documentation is
inserted.
For golang/go#37102
Change-Id: I82cc0425ec9cdadc2c5449038fedfd6920e1adc0
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/291089
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'internal/testing/sample')
| -rw-r--r-- | internal/testing/sample/sample.go | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/internal/testing/sample/sample.go b/internal/testing/sample/sample.go index 5fdcb292..1069199a 100644 --- a/internal/testing/sample/sample.go +++ b/internal/testing/sample/sample.go @@ -75,6 +75,46 @@ var ( package p var V int `) + Constant = &internal.Symbol{ + Name: "Constant", + Synopsis: "const Constant", + Section: internal.SymbolSectionConstants, + Kind: internal.SymbolKindConstant, + } + Variable = &internal.Symbol{ + Name: "Variable", + Synopsis: "var Variable", + Section: internal.SymbolSectionVariables, + Kind: internal.SymbolKindVariable, + } + Function = &internal.Symbol{ + Name: "Function", + Synopsis: "func Function() error", + Section: internal.SymbolSectionFunctions, + Kind: internal.SymbolKindFunction, + } + Type = &internal.Symbol{ + Name: "Type", + Synopsis: "type Type struct", + Section: internal.SymbolSectionTypes, + Kind: internal.SymbolKindType, + Children: []*internal.Symbol{ + { + Name: "Field", + Synopsis: "field", + Section: internal.SymbolSectionTypes, + Kind: internal.SymbolKindField, + ParentName: "Type.Field", + }, + { + Name: "Method", + Synopsis: "method", + Section: internal.SymbolSectionTypes, + Kind: internal.SymbolKindMethod, + ParentName: "Type.Method", + }, + }, + } ) // LicenseCmpOpts are options to use when comparing licenses with the cmp package. |
