forked from golang/pkgsite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/postgres: insert module path even if not a package
When inserting the paths of a module into the paths table, we were inserting all the package paths and the v1 module path (the module path without "/vN" suffix). That is almost always sufficient. But if a module has a version suffix and is not itself a package, then we were not inserting its path. The module path is needed by insertSymbols, so this was causing that function to fail. Add the module path, refactor the code to simplify it and allow testing, and add a test. (For a vN module the code also adds the v1 package path for every package. I think this is unnecessary, but it's too risky to remove it.) Change-Id: I8caa3dd945692a4ec0a1128199237de6b77aa719 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/609117 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Robert Findley <[email protected]> kokoro-CI: kokoro <[email protected]>
- Loading branch information
Showing
2 changed files
with
54 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters