diff options
| author | Julie Qiu <julie@golang.org> | 2020-08-28 00:49:09 -0400 |
|---|---|---|
| committer | Julie Qiu <julie@golang.org> | 2020-08-28 14:25:20 +0000 |
| commit | dee9bdb3c8c2ae0b8cd19d16ebe646ca73068812 (patch) | |
| tree | 054c45a601b8500ceea0415b36e2e4f32e42d0d2 /internal/testing/sample/sample.go | |
| parent | db8f07c3a29d8acc73cef9d7fa723b58ad5a9716 (diff) | |
| download | go-x-pkgsite-dee9bdb3c8c2ae0b8cd19d16ebe646ca73068812.tar.xz | |
internal/postgres: add WithImports fieldset to GetDirectory
GetDirectory now supports the WithImports fieldset, which lets the
caller fetch only the imports.
The Package.Imports field is moved to Directory.Imports.
For golang/go#39629.
Change-Id: I5d597555fa372cc1ee70390460d349fa83f31425
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/251272
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Diffstat (limited to 'internal/testing/sample/sample.go')
| -rw-r--r-- | internal/testing/sample/sample.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/testing/sample/sample.go b/internal/testing/sample/sample.go index 63d69859..984e05f8 100644 --- a/internal/testing/sample/sample.go +++ b/internal/testing/sample/sample.go @@ -294,10 +294,10 @@ func DirectoryForPackage(pkg *internal.LegacyPackage) *internal.Directory { Licenses: pkg.Licenses, V1Path: pkg.V1Path, }, + Imports: pkg.Imports, Package: &internal.Package{ - Name: pkg.Name, - Path: pkg.Path, - Imports: pkg.Imports, + Name: pkg.Name, + Path: pkg.Path, Documentation: &internal.Documentation{ Synopsis: pkg.Synopsis, HTML: pkg.DocumentationHTML, |
