diff --git a/go/vcs/vcs.go b/go/vcs/vcs.go index c1d0ecd0..a7024966 100644 --- a/go/vcs/vcs.go +++ b/go/vcs/vcs.go @@ -478,11 +478,11 @@ func RepoRootForImportPathStatic(importPath, scheme string) (*RepoRoot, error) { // RepoRootForImportDynamic finds a *RepoRoot for a custom domain that's not // statically known by RepoRootForImportPathStatic. // -// This handles "vanity import paths" like "name.tld/pkg/foo". +// This handles custom import paths like "name.tld/pkg/foo" or just "name.tld". func RepoRootForImportDynamic(importPath string, verbose bool) (*RepoRoot, error) { slash := strings.Index(importPath, "/") if slash < 0 { - return nil, errors.New("import path doesn't contain a slash") + slash = len(importPath) } host := importPath[:slash] if !strings.Contains(host, ".") {