aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/insert_module_test.go
diff options
context:
space:
mode:
authorJulie Qiu <julie@golang.org>2020-12-23 19:20:54 -0500
committerJulie Qiu <julie@golang.org>2020-12-28 18:46:41 +0000
commit2cb694fa0608f2b30b2a5a39deb742db42d02629 (patch)
treed9dd214626a31611ee5b92187d12936065b98eed /internal/postgres/insert_module_test.go
parent96b5eb8c906e257687596244653c70ccd05bb692 (diff)
downloadgo-x-pkgsite-2cb694fa0608f2b30b2a5a39deb742db42d02629.tar.xz
internal/postgres: list non-redistributable packages
Currently, non-redistributable packages are not listed in the directories section, since they won't have a row in the documentation section. These are now listed with an empty synopsis. Change-Id: Id787b91cd58c698daf547e9dff8921df5c0f097f Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/280094 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org>
Diffstat (limited to 'internal/postgres/insert_module_test.go')
-rw-r--r--internal/postgres/insert_module_test.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/postgres/insert_module_test.go b/internal/postgres/insert_module_test.go
index 3644d643..3b2f429e 100644
--- a/internal/postgres/insert_module_test.go
+++ b/internal/postgres/insert_module_test.go
@@ -89,8 +89,7 @@ func checkModule(ctx context.Context, t *testing.T, want *internal.Module) {
wantu.LicenseContents = sample.Licenses
var subdirectories []*internal.PackageMeta
for _, u := range want.Units {
- if u.IsPackage() && (strings.HasPrefix(u.Path, wantu.Path) ||
- wantu.Path == stdlib.ModulePath) {
+ if u.IsPackage() && (strings.HasPrefix(u.Path, wantu.Path) || wantu.Path == stdlib.ModulePath) {
subdirectories = append(subdirectories, sample.PackageMeta(u.Path))
}
}