diff options
| author | Julie Qiu <julie@golang.org> | 2021-05-01 02:59:55 -0400 |
|---|---|---|
| committer | Julie Qiu <julie@golang.org> | 2021-05-04 02:15:00 +0000 |
| commit | d61744311c202fe489c86c5a04e88c0c155c9ab6 (patch) | |
| tree | 15d3d06eac8b789711931c2bb68594258e049035 /internal/testing/sample/sample.go | |
| parent | bf9e865315fa314155f29070eaf04252e834ace3 (diff) | |
| download | go-x-pkgsite-d61744311c202fe489c86c5a04e88c0c155c9ab6.tar.xz | |
internal: change Symbol.Children to SymbolMeta
The children of a symbol will always have the same build context and no
other children. As a result, Symbol.Children are changed to the
SymbolMeta type.
For golang/go#37102
Change-Id: I89c361f86eff7179c18572e57a5dd0788fea4b1d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/315432
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'internal/testing/sample/sample.go')
| -rw-r--r-- | internal/testing/sample/sample.go | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/internal/testing/sample/sample.go b/internal/testing/sample/sample.go index ee4f7890..eb9ef9f8 100644 --- a/internal/testing/sample/sample.go +++ b/internal/testing/sample/sample.go @@ -112,29 +112,24 @@ var ( }, GOOS: internal.All, GOARCH: internal.All, - Children: []*internal.Symbol{ - FunctionNew, + Children: []*internal.SymbolMeta{ + func() *internal.SymbolMeta { + n := FunctionNew.SymbolMeta + return &n + }(), { - SymbolMeta: internal.SymbolMeta{ - Name: "Type.Field", - Synopsis: "field", - Section: internal.SymbolSectionTypes, - Kind: internal.SymbolKindField, - ParentName: "Type", - }, - GOOS: internal.All, - GOARCH: internal.All, + Name: "Type.Field", + Synopsis: "field", + Section: internal.SymbolSectionTypes, + Kind: internal.SymbolKindField, + ParentName: "Type", }, { - SymbolMeta: internal.SymbolMeta{ - Name: "Type.Method", - Synopsis: "method", - Section: internal.SymbolSectionTypes, - Kind: internal.SymbolKindMethod, - ParentName: "Type", - }, - GOOS: internal.All, - GOARCH: internal.All, + Name: "Type.Method", + Synopsis: "method", + Section: internal.SymbolSectionTypes, + Kind: internal.SymbolKindMethod, + ParentName: "Type", }, }, } |
