Previously, it was checking for valid _import_ paths, but some valid
import paths are not valid module paths.
Change-Id: Ib8d970169462744b7700ec623dbfe1319756a7d1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/350109
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>
Factor out the logic for constructing possible module paths
from a full path. It is used in two places and will also
be used in a revised postgres.DB.GetUnitMeta method.
Change-Id: I7e6d716ae75f5d8a9877ed9d477d44c2dd7acfe2
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/298969
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>