aboutsummaryrefslogtreecommitdiff
path: root/internal/testing/sample/sample.go
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2021-01-29 18:44:53 -0500
committerJonathan Amsterdam <jba@google.com>2021-02-02 19:36:47 +0000
commit814534999dcbf4fa3d7b358a6de57bf2d44fc450 (patch)
tree712ffee18ee7ac7953160860419735cfe0402eec /internal/testing/sample/sample.go
parent1fe92ed1d8906c5c7253e7f1f03cb008e08a640c (diff)
downloadgo-x-pkgsite-814534999dcbf4fa3d7b358a6de57bf2d44fc450.tar.xz
many: allow for multiple documentations for a Unit
Change internal.Unit.Documentation from a single internal.Documentation to a slice, so that a Unit can have doc for multiple build contexts. However, don't use this ability yet: fetch takes only the first build context it finds, postgres inserts only the first, frontend renders only the first, etc. For golang/go#37232 Change-Id: I17fd1ff2378e0862c029c8077057c207001f6136 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/288217 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org> Reviewed-by: Jamal Carvalho <jamal@golang.org>
Diffstat (limited to 'internal/testing/sample/sample.go')
-rw-r--r--internal/testing/sample/sample.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/testing/sample/sample.go b/internal/testing/sample/sample.go
index 0376d708..4df0df6e 100644
--- a/internal/testing/sample/sample.go
+++ b/internal/testing/sample/sample.go
@@ -140,12 +140,12 @@ func UnitForModuleRoot(m *internal.ModuleInfo) *internal.Unit {
func UnitForPackage(path, modulePath, version, name string, isRedistributable bool) *internal.Unit {
return &internal.Unit{
UnitMeta: *UnitMeta(path, modulePath, version, name, isRedistributable),
- Documentation: &internal.Documentation{
+ Documentation: []*internal.Documentation{{
Synopsis: Synopsis,
Source: DocumentationSource,
GOOS: GOOS,
GOARCH: GOARCH,
- },
+ }},
LicenseContents: Licenses,
Imports: Imports,
NumImports: len(Imports),