aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md4
-rw-r--r--cmd/frontend/main.go22
-rw-r--r--cmd/prober/main.go10
-rw-r--r--cmd/worker/main.go22
-rw-r--r--go.mod2
-rw-r--r--internal/auth/auth.go2
-rw-r--r--internal/complete/completion.go2
-rw-r--r--internal/config/config.go4
-rw-r--r--internal/database/database.go6
-rw-r--r--internal/database/database_test.go2
-rw-r--r--internal/datasource.go2
-rw-r--r--internal/dcensus/dcensus.go6
-rw-r--r--internal/discovery.go6
-rw-r--r--internal/fetch/directory.go6
-rw-r--r--internal/fetch/directory_test.go6
-rw-r--r--internal/fetch/dochtml/dochtml.go6
-rw-r--r--internal/fetch/dochtml/dochtml_test.go2
-rw-r--r--internal/fetch/dochtml/internal/render/idents.go2
-rw-r--r--internal/fetch/dochtml/internal/render/idents_test.go2
-rw-r--r--internal/fetch/dochtml/internal/render/linkify.go2
-rw-r--r--internal/fetch/dochtml/internal/render/render.go2
-rw-r--r--internal/fetch/dochtml/internal/render/render_test.go2
-rw-r--r--internal/fetch/dochtml/template.go4
-rw-r--r--internal/fetch/fetch.go22
-rw-r--r--internal/fetch/fetch_test.go18
-rw-r--r--internal/fetch/fetchdata_test.go12
-rw-r--r--internal/fetch/internal/doc/example_test.go2
-rw-r--r--internal/fetch/test_helper.go12
-rw-r--r--internal/frontend/completion.go6
-rw-r--r--internal/frontend/completion_test.go2
-rw-r--r--internal/frontend/details.go6
-rw-r--r--internal/frontend/details_test.go4
-rw-r--r--internal/frontend/directory.go8
-rw-r--r--internal/frontend/directory_test.go10
-rw-r--r--internal/frontend/doc.go6
-rw-r--r--internal/frontend/doc_test.go4
-rw-r--r--internal/frontend/header.go10
-rw-r--r--internal/frontend/header_test.go8
-rw-r--r--internal/frontend/imports.go4
-rw-r--r--internal/frontend/imports_test.go6
-rw-r--r--internal/frontend/latest_version.go6
-rw-r--r--internal/frontend/license.go4
-rw-r--r--internal/frontend/module.go6
-rw-r--r--internal/frontend/overview.go4
-rw-r--r--internal/frontend/overview_test.go12
-rw-r--r--internal/frontend/package.go6
-rw-r--r--internal/frontend/paginate.go2
-rw-r--r--internal/frontend/search.go6
-rw-r--r--internal/frontend/search_test.go10
-rw-r--r--internal/frontend/server.go14
-rw-r--r--internal/frontend/server_test.go14
-rw-r--r--internal/frontend/stdlib.go6
-rw-r--r--internal/frontend/stdlib_test.go2
-rw-r--r--internal/frontend/tabs.go4
-rw-r--r--internal/frontend/versions.go8
-rw-r--r--internal/frontend/versions_test.go10
-rw-r--r--internal/index/index.go4
-rw-r--r--internal/index/index_test.go2
-rw-r--r--internal/index/test_helper.go4
-rw-r--r--internal/log/log.go6
-rw-r--r--internal/middleware/caching.go2
-rw-r--r--internal/middleware/experiment.go8
-rw-r--r--internal/middleware/experiment_test.go4
-rw-r--r--internal/middleware/godoc.go2
-rw-r--r--internal/middleware/latestversion.go2
-rw-r--r--internal/middleware/panic.go2
-rw-r--r--internal/middleware/quota.go2
-rw-r--r--internal/middleware/quota_test.go2
-rw-r--r--internal/middleware/requestlog.go2
-rw-r--r--internal/middleware/secureheaders.go2
-rw-r--r--internal/postgres/benchmarks_test.go6
-rw-r--r--internal/postgres/details.go10
-rw-r--r--internal/postgres/details_test.go12
-rw-r--r--internal/postgres/directory.go8
-rw-r--r--internal/postgres/directory_test.go12
-rw-r--r--internal/postgres/excluded.go4
-rw-r--r--internal/postgres/experiment.go4
-rw-r--r--internal/postgres/experiment_test.go2
-rw-r--r--internal/postgres/insert_module.go14
-rw-r--r--internal/postgres/insert_module_test.go12
-rw-r--r--internal/postgres/package.go8
-rw-r--r--internal/postgres/package_test.go12
-rw-r--r--internal/postgres/parent_directories_test.go4
-rw-r--r--internal/postgres/postgres.go2
-rw-r--r--internal/postgres/search.go10
-rw-r--r--internal/postgres/search_test.go6
-rw-r--r--internal/postgres/test_helper.go12
-rw-r--r--internal/postgres/version_map.go6
-rw-r--r--internal/postgres/version_map_test.go4
-rw-r--r--internal/postgres/versionstate.go10
-rw-r--r--internal/postgres/versionstate_test.go4
-rw-r--r--internal/proxy/client.go4
-rw-r--r--internal/proxy/client_test.go6
-rw-r--r--internal/proxy/test_helper.go2
-rw-r--r--internal/proxydatasource/datasource.go14
-rw-r--r--internal/proxydatasource/datasource_test.go12
-rw-r--r--internal/queue/queue.go10
-rw-r--r--internal/secrets/secrets.go2
-rw-r--r--internal/source/meta-tags.go2
-rw-r--r--internal/source/source.go8
-rw-r--r--internal/stdlib/stdlib.go4
-rw-r--r--internal/testing/integration/frontend_test.go16
-rw-r--r--internal/testing/integration/integration_test.go20
-rw-r--r--internal/testing/pagecheck/pagecheck.go4
-rw-r--r--internal/testing/sample/sample.go8
-rw-r--r--internal/worker/completion.go8
-rw-r--r--internal/worker/completion_test.go6
-rw-r--r--internal/worker/fetch.go20
-rw-r--r--internal/worker/fetch_test.go18
-rw-r--r--internal/worker/server.go22
-rw-r--r--internal/worker/server_test.go18
111 files changed, 394 insertions, 394 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 0230d541..c825a124 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -26,9 +26,9 @@ Before you begin working on an issue, please leave a comment that you are claimi
1. Get the source code:
-` $ git clone https://go.googlesource.com/discovery`
+` $ git clone https://go.googlesource.com/pkgsite`
-- Our canonical Git repository is located at [https://go.googlesource.com/discovery](https://go.googlesource.com/discovery). [github.com/golang/discovery](https://github.com/golang/discovery) is a mirror of that repository.
+- Our canonical Git repository is located at [https://go.googlesource.com/pkgsite](https://go.googlesource.com/pkgsite). [github.com/golang/pkgsite](https://github.com/golang/pkgsite) is a mirror of that repository.
2. Review the [design document](doc/design.md).
diff --git a/cmd/frontend/main.go b/cmd/frontend/main.go
index 4d5c6749..83322791 100644
--- a/cmd/frontend/main.go
+++ b/cmd/frontend/main.go
@@ -17,17 +17,17 @@ import (
"cloud.google.com/go/profiler"
"contrib.go.opencensus.io/integrations/ocsql"
"github.com/go-redis/redis/v7"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/config"
- "golang.org/x/discovery/internal/database"
- "golang.org/x/discovery/internal/dcensus"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/frontend"
- "golang.org/x/discovery/internal/log"
- "golang.org/x/discovery/internal/middleware"
- "golang.org/x/discovery/internal/postgres"
- "golang.org/x/discovery/internal/proxy"
- "golang.org/x/discovery/internal/proxydatasource"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/config"
+ "golang.org/x/pkgsite/internal/database"
+ "golang.org/x/pkgsite/internal/dcensus"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/frontend"
+ "golang.org/x/pkgsite/internal/log"
+ "golang.org/x/pkgsite/internal/middleware"
+ "golang.org/x/pkgsite/internal/postgres"
+ "golang.org/x/pkgsite/internal/proxy"
+ "golang.org/x/pkgsite/internal/proxydatasource"
)
var (
diff --git a/cmd/prober/main.go b/cmd/prober/main.go
index 6cfba27d..3d66039f 100644
--- a/cmd/prober/main.go
+++ b/cmd/prober/main.go
@@ -24,11 +24,11 @@ import (
"go.opencensus.io/stats"
"go.opencensus.io/stats/view"
"go.opencensus.io/tag"
- "golang.org/x/discovery/internal/auth"
- "golang.org/x/discovery/internal/config"
- "golang.org/x/discovery/internal/dcensus"
- "golang.org/x/discovery/internal/log"
- "golang.org/x/discovery/internal/secrets"
+ "golang.org/x/pkgsite/internal/auth"
+ "golang.org/x/pkgsite/internal/config"
+ "golang.org/x/pkgsite/internal/dcensus"
+ "golang.org/x/pkgsite/internal/log"
+ "golang.org/x/pkgsite/internal/secrets"
)
var credsFile = flag.String("creds", "", "filename for credentials, when running locally")
diff --git a/cmd/worker/main.go b/cmd/worker/main.go
index 0fc52a5b..96eef819 100644
--- a/cmd/worker/main.go
+++ b/cmd/worker/main.go
@@ -20,18 +20,18 @@ import (
"cloud.google.com/go/errorreporting"
"cloud.google.com/go/profiler"
"github.com/go-redis/redis/v7"
- "golang.org/x/discovery/internal/config"
- "golang.org/x/discovery/internal/database"
- "golang.org/x/discovery/internal/dcensus"
- "golang.org/x/discovery/internal/index"
- "golang.org/x/discovery/internal/queue"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/worker"
+ "golang.org/x/pkgsite/internal/config"
+ "golang.org/x/pkgsite/internal/database"
+ "golang.org/x/pkgsite/internal/dcensus"
+ "golang.org/x/pkgsite/internal/index"
+ "golang.org/x/pkgsite/internal/queue"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/worker"
- "golang.org/x/discovery/internal/log"
- "golang.org/x/discovery/internal/middleware"
- "golang.org/x/discovery/internal/postgres"
- "golang.org/x/discovery/internal/proxy"
+ "golang.org/x/pkgsite/internal/log"
+ "golang.org/x/pkgsite/internal/middleware"
+ "golang.org/x/pkgsite/internal/postgres"
+ "golang.org/x/pkgsite/internal/proxy"
"contrib.go.opencensus.io/integrations/ocsql"
)
diff --git a/go.mod b/go.mod
index 0df8e6ae..d1b6b0d6 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module golang.org/x/discovery
+module golang.org/x/pkgsite
go 1.13
diff --git a/internal/auth/auth.go b/internal/auth/auth.go
index 9340400e..ba8e71ff 100644
--- a/internal/auth/auth.go
+++ b/internal/auth/auth.go
@@ -10,9 +10,9 @@ import (
"fmt"
"net/http"
- "golang.org/x/discovery/internal/derrors"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
+ "golang.org/x/pkgsite/internal/derrors"
)
// clientID is the OAuth 2.0 Client ID.
diff --git a/internal/complete/completion.go b/internal/complete/completion.go
index 1241ae08..01a39871 100644
--- a/internal/complete/completion.go
+++ b/internal/complete/completion.go
@@ -12,7 +12,7 @@ import (
"strconv"
"strings"
- "golang.org/x/discovery/internal/derrors"
+ "golang.org/x/pkgsite/internal/derrors"
)
const keySep = "|"
diff --git a/internal/config/config.go b/internal/config/config.go
index e57acad5..4c57b4bc 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -23,9 +23,9 @@ import (
"cloud.google.com/go/storage"
"github.com/ghodss/yaml"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/secrets"
"golang.org/x/net/context/ctxhttp"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/secrets"
mrpb "google.golang.org/genproto/googleapis/api/monitoredres"
)
diff --git a/internal/database/database.go b/internal/database/database.go
index 3aefd19f..9a27ebce 100644
--- a/internal/database/database.go
+++ b/internal/database/database.go
@@ -19,9 +19,9 @@ import (
"unicode"
"github.com/lib/pq"
- "golang.org/x/discovery/internal/config"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal/config"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/log"
)
// DB wraps a sql.DB. The methods it exports correspond closely to those of
diff --git a/internal/database/database_test.go b/internal/database/database_test.go
index 789983de..589acf17 100644
--- a/internal/database/database_test.go
+++ b/internal/database/database_test.go
@@ -16,7 +16,7 @@ import (
"time"
"github.com/google/go-cmp/cmp"
- "golang.org/x/discovery/internal/testing/dbtest"
+ "golang.org/x/pkgsite/internal/testing/dbtest"
)
const testTimeout = 5 * time.Second
diff --git a/internal/datasource.go b/internal/datasource.go
index 8924ce83..70531f5d 100644
--- a/internal/datasource.go
+++ b/internal/datasource.go
@@ -7,7 +7,7 @@ package internal
import (
"context"
- "golang.org/x/discovery/internal/licenses"
+ "golang.org/x/pkgsite/internal/licenses"
)
// DataSource is the interface used by the frontend to interact with module data.
diff --git a/internal/dcensus/dcensus.go b/internal/dcensus/dcensus.go
index c1c66ae4..01e3b85d 100644
--- a/internal/dcensus/dcensus.go
+++ b/internal/dcensus/dcensus.go
@@ -19,9 +19,9 @@ import (
"go.opencensus.io/tag"
"go.opencensus.io/trace"
"go.opencensus.io/zpages"
- "golang.org/x/discovery/internal/config"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal/config"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/log"
mrpb "google.golang.org/genproto/googleapis/api/monitoredres"
)
diff --git a/internal/discovery.go b/internal/discovery.go
index 4d6f55e4..f67d2431 100644
--- a/internal/discovery.go
+++ b/internal/discovery.go
@@ -7,10 +7,10 @@ package internal
import (
"time"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/version"
"golang.org/x/mod/module"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/version"
)
const (
diff --git a/internal/fetch/directory.go b/internal/fetch/directory.go
index dfbe5f22..8b48c6f5 100644
--- a/internal/fetch/directory.go
+++ b/internal/fetch/directory.go
@@ -8,9 +8,9 @@ import (
"path"
"strings"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/stdlib"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/stdlib"
)
// moduleDirectories returns all of the directories in a given module, along
diff --git a/internal/fetch/directory_test.go b/internal/fetch/directory_test.go
index 7489c712..f519c08b 100644
--- a/internal/fetch/directory_test.go
+++ b/internal/fetch/directory_test.go
@@ -9,9 +9,9 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/stdlib"
- "golang.org/x/discovery/internal/testing/sample"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/testing/sample"
)
func TestDirectoryPaths(t *testing.T) {
diff --git a/internal/fetch/dochtml/dochtml.go b/internal/fetch/dochtml/dochtml.go
index 52e4a143..dd1806bf 100644
--- a/internal/fetch/dochtml/dochtml.go
+++ b/internal/fetch/dochtml/dochtml.go
@@ -6,7 +6,7 @@
//
// This package and its API are under development (see b/137567588).
// It currently relies on copies of external packages with active CLs applied.
-// The plan is to iterate on the development internally for x/discovery
+// The plan is to iterate on the development internally for x/pkgsite
// needs first, before factoring it out somewhere non-internal where its
// API can no longer be easily modified.
package dochtml
@@ -23,8 +23,8 @@ import (
"sort"
"strings"
- "golang.org/x/discovery/internal/fetch/dochtml/internal/render"
- "golang.org/x/discovery/internal/fetch/internal/doc"
+ "golang.org/x/pkgsite/internal/fetch/dochtml/internal/render"
+ "golang.org/x/pkgsite/internal/fetch/internal/doc"
)
var (
diff --git a/internal/fetch/dochtml/dochtml_test.go b/internal/fetch/dochtml/dochtml_test.go
index 71fa58db..c1455cad 100644
--- a/internal/fetch/dochtml/dochtml_test.go
+++ b/internal/fetch/dochtml/dochtml_test.go
@@ -15,8 +15,8 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
- "golang.org/x/discovery/internal/fetch/internal/doc"
"golang.org/x/net/html"
+ "golang.org/x/pkgsite/internal/fetch/internal/doc"
)
func TestRender(t *testing.T) {
diff --git a/internal/fetch/dochtml/internal/render/idents.go b/internal/fetch/dochtml/internal/render/idents.go
index 0edcbbbc..86e13ad2 100644
--- a/internal/fetch/dochtml/internal/render/idents.go
+++ b/internal/fetch/dochtml/internal/render/idents.go
@@ -13,7 +13,7 @@ import (
"unicode"
"unicode/utf8"
- "golang.org/x/discovery/internal/fetch/internal/doc"
+ "golang.org/x/pkgsite/internal/fetch/internal/doc"
)
/*
diff --git a/internal/fetch/dochtml/internal/render/idents_test.go b/internal/fetch/dochtml/internal/render/idents_test.go
index 2ff05cfe..06f28d18 100644
--- a/internal/fetch/dochtml/internal/render/idents_test.go
+++ b/internal/fetch/dochtml/internal/render/idents_test.go
@@ -8,7 +8,7 @@ import (
"go/ast"
"testing"
- "golang.org/x/discovery/internal/fetch/internal/doc"
+ "golang.org/x/pkgsite/internal/fetch/internal/doc"
)
func TestResolveIdentifier(t *testing.T) {
diff --git a/internal/fetch/dochtml/internal/render/linkify.go b/internal/fetch/dochtml/internal/render/linkify.go
index 57ce9166..8e658c8e 100644
--- a/internal/fetch/dochtml/internal/render/linkify.go
+++ b/internal/fetch/dochtml/internal/render/linkify.go
@@ -17,7 +17,7 @@ import (
"strconv"
"strings"
- "golang.org/x/discovery/internal/fetch/internal/doc"
+ "golang.org/x/pkgsite/internal/fetch/internal/doc"
)
/*
diff --git a/internal/fetch/dochtml/internal/render/render.go b/internal/fetch/dochtml/internal/render/render.go
index 565317cd..c1670cbe 100644
--- a/internal/fetch/dochtml/internal/render/render.go
+++ b/internal/fetch/dochtml/internal/render/render.go
@@ -17,7 +17,7 @@ import (
"regexp"
"strings"
- "golang.org/x/discovery/internal/fetch/internal/doc"
+ "golang.org/x/pkgsite/internal/fetch/internal/doc"
)
// TODO: Hide slice elements and long strings to avoid overwhelming godoc.
diff --git a/internal/fetch/dochtml/internal/render/render_test.go b/internal/fetch/dochtml/internal/render/render_test.go
index d73eeb8b..5740ddad 100644
--- a/internal/fetch/dochtml/internal/render/render_test.go
+++ b/internal/fetch/dochtml/internal/render/render_test.go
@@ -14,7 +14,7 @@ import (
"strings"
"testing"
- "golang.org/x/discovery/internal/fetch/internal/doc"
+ "golang.org/x/pkgsite/internal/fetch/internal/doc"
)
var (
diff --git a/internal/fetch/dochtml/template.go b/internal/fetch/dochtml/template.go
index 3dda8052..f1f5b628 100644
--- a/internal/fetch/dochtml/template.go
+++ b/internal/fetch/dochtml/template.go
@@ -8,8 +8,8 @@ import (
"html/template"
"reflect"
- "golang.org/x/discovery/internal/fetch/dochtml/internal/render"
- "golang.org/x/discovery/internal/fetch/internal/doc"
+ "golang.org/x/pkgsite/internal/fetch/dochtml/internal/render"
+ "golang.org/x/pkgsite/internal/fetch/internal/doc"
)
// htmlPackage is the template used to render documentation HTML.
diff --git a/internal/fetch/fetch.go b/internal/fetch/fetch.go
index 5907ba47..b35914fc 100644
--- a/internal/fetch/fetch.go
+++ b/internal/fetch/fetch.go
@@ -27,19 +27,19 @@ import (
"time"
"go.opencensus.io/trace"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/experiment"
- "golang.org/x/discovery/internal/fetch/dochtml"
- "golang.org/x/discovery/internal/fetch/internal/doc"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/log"
- "golang.org/x/discovery/internal/proxy"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/stdlib"
- "golang.org/x/discovery/internal/version"
"golang.org/x/mod/modfile"
"golang.org/x/mod/module"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/experiment"
+ "golang.org/x/pkgsite/internal/fetch/dochtml"
+ "golang.org/x/pkgsite/internal/fetch/internal/doc"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/log"
+ "golang.org/x/pkgsite/internal/proxy"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/version"
)
var (
diff --git a/internal/fetch/fetch_test.go b/internal/fetch/fetch_test.go
index ac5d5cc1..256ce9e1 100644
--- a/internal/fetch/fetch_test.go
+++ b/internal/fetch/fetch_test.go
@@ -21,15 +21,15 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/experiment"
- "golang.org/x/discovery/internal/fetch/internal/doc"
- "golang.org/x/discovery/internal/proxy"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/stdlib"
- "golang.org/x/discovery/internal/testing/sample"
- "golang.org/x/discovery/internal/testing/testhelper"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/experiment"
+ "golang.org/x/pkgsite/internal/fetch/internal/doc"
+ "golang.org/x/pkgsite/internal/proxy"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/testing/sample"
+ "golang.org/x/pkgsite/internal/testing/testhelper"
)
var (
diff --git a/internal/fetch/fetchdata_test.go b/internal/fetch/fetchdata_test.go
index 1022cc11..7b130910 100644
--- a/internal/fetch/fetchdata_test.go
+++ b/internal/fetch/fetchdata_test.go
@@ -7,12 +7,12 @@ package fetch
import (
"net/http"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/proxy"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/stdlib"
- "golang.org/x/discovery/internal/testing/testhelper"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/proxy"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/testing/testhelper"
)
type testModule struct {
diff --git a/internal/fetch/internal/doc/example_test.go b/internal/fetch/internal/doc/example_test.go
index 3e30b192..d4020f71 100644
--- a/internal/fetch/internal/doc/example_test.go
+++ b/internal/fetch/internal/doc/example_test.go
@@ -15,7 +15,7 @@ import (
"strings"
"testing"
- "golang.org/x/discovery/internal/fetch/internal/doc"
+ "golang.org/x/pkgsite/internal/fetch/internal/doc"
)
const exampleTestFile = `
diff --git a/internal/fetch/test_helper.go b/internal/fetch/test_helper.go
index 8229b886..9c349b02 100644
--- a/internal/fetch/test_helper.go
+++ b/internal/fetch/test_helper.go
@@ -14,12 +14,12 @@ import (
"time"
"github.com/google/go-cmp/cmp"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/log"
- "golang.org/x/discovery/internal/proxy"
- "golang.org/x/discovery/internal/stdlib"
- "golang.org/x/discovery/internal/version"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/log"
+ "golang.org/x/pkgsite/internal/proxy"
+ "golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/version"
)
var testProxyCommitTime = time.Date(2019, 1, 30, 0, 0, 0, 0, time.UTC)
diff --git a/internal/frontend/completion.go b/internal/frontend/completion.go
index c8166e20..93a346d4 100644
--- a/internal/frontend/completion.go
+++ b/internal/frontend/completion.go
@@ -14,9 +14,9 @@ import (
"strings"
"github.com/go-redis/redis/v7"
- "golang.org/x/discovery/internal/complete"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal/complete"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/log"
)
// handleAutoCompletion handles requests for /autocomplete?q=<input prefix>, by
diff --git a/internal/frontend/completion_test.go b/internal/frontend/completion_test.go
index a9f14b60..c44af5fc 100644
--- a/internal/frontend/completion_test.go
+++ b/internal/frontend/completion_test.go
@@ -11,7 +11,7 @@ import (
"github.com/alicebob/miniredis/v2"
"github.com/go-redis/redis/v7"
"github.com/google/go-cmp/cmp"
- "golang.org/x/discovery/internal/complete"
+ "golang.org/x/pkgsite/internal/complete"
)
func TestAutoCompletion(t *testing.T) {
diff --git a/internal/frontend/details.go b/internal/frontend/details.go
index a64077e9..9d434ba8 100644
--- a/internal/frontend/details.go
+++ b/internal/frontend/details.go
@@ -11,11 +11,11 @@ import (
"net/http"
"strings"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/stdlib"
"golang.org/x/mod/module"
"golang.org/x/mod/semver"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/stdlib"
)
// DetailsPage contains data for a package of module details template.
diff --git a/internal/frontend/details_test.go b/internal/frontend/details_test.go
index dcf33486..b5e81314 100644
--- a/internal/frontend/details_test.go
+++ b/internal/frontend/details_test.go
@@ -11,8 +11,8 @@ import (
"strings"
"testing"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/stdlib"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/stdlib"
)
func TestParseDetailsURLPath(t *testing.T) {
diff --git a/internal/frontend/directory.go b/internal/frontend/directory.go
index 8af4ff1b..415b42d8 100644
--- a/internal/frontend/directory.go
+++ b/internal/frontend/directory.go
@@ -13,10 +13,10 @@ import (
"sort"
"strings"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/stdlib"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/stdlib"
)
// DirectoryPage contains data needed to generate a directory template.
diff --git a/internal/frontend/directory_test.go b/internal/frontend/directory_test.go
index 3f81eef8..cb4519f7 100644
--- a/internal/frontend/directory_test.go
+++ b/internal/frontend/directory_test.go
@@ -12,11 +12,11 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/postgres"
- "golang.org/x/discovery/internal/stdlib"
- "golang.org/x/discovery/internal/testing/sample"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/postgres"
+ "golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/testing/sample"
)
func TestFetchDirectoryDetails(t *testing.T) {
diff --git a/internal/frontend/doc.go b/internal/frontend/doc.go
index c8153aba..74f911f0 100644
--- a/internal/frontend/doc.go
+++ b/internal/frontend/doc.go
@@ -11,9 +11,9 @@ import (
"regexp"
"strings"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/log"
- "golang.org/x/discovery/internal/stdlib"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/log"
+ "golang.org/x/pkgsite/internal/stdlib"
)
// DocumentationDetails contains data for the doc template.
diff --git a/internal/frontend/doc_test.go b/internal/frontend/doc_test.go
index 8540e3d6..6add15ae 100644
--- a/internal/frontend/doc_test.go
+++ b/internal/frontend/doc_test.go
@@ -8,8 +8,8 @@ import (
"fmt"
"testing"
- "golang.org/x/discovery/internal/stdlib"
- "golang.org/x/discovery/internal/testing/sample"
+ "golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/testing/sample"
)
func TestFileSource(t *testing.T) {
diff --git a/internal/frontend/header.go b/internal/frontend/header.go
index df1ed99d..af6ebf31 100644
--- a/internal/frontend/header.go
+++ b/internal/frontend/header.go
@@ -11,12 +11,12 @@ import (
"strings"
"time"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/middleware"
- "golang.org/x/discovery/internal/stdlib"
"golang.org/x/mod/module"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/middleware"
+ "golang.org/x/pkgsite/internal/stdlib"
)
// Package contains information for an individual package.
diff --git a/internal/frontend/header_test.go b/internal/frontend/header_test.go
index d15ccb5e..e5572813 100644
--- a/internal/frontend/header_test.go
+++ b/internal/frontend/header_test.go
@@ -11,11 +11,11 @@ import (
"time"
"github.com/google/go-cmp/cmp"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/middleware"
- "golang.org/x/discovery/internal/testing/htmlcheck"
- "golang.org/x/discovery/internal/testing/sample"
"golang.org/x/net/html"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/middleware"
+ "golang.org/x/pkgsite/internal/testing/htmlcheck"
+ "golang.org/x/pkgsite/internal/testing/sample"
)
func samplePackage(mutators ...func(*Package)) *Package {
diff --git a/internal/frontend/imports.go b/internal/frontend/imports.go
index 21516b7c..59463005 100644
--- a/internal/frontend/imports.go
+++ b/internal/frontend/imports.go
@@ -8,8 +8,8 @@ import (
"context"
"strings"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/stdlib"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/stdlib"
)
// ImportsDetails contains information for a package's imports.
diff --git a/internal/frontend/imports_test.go b/internal/frontend/imports_test.go
index c790128c..54c1765b 100644
--- a/internal/frontend/imports_test.go
+++ b/internal/frontend/imports_test.go
@@ -9,9 +9,9 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/postgres"
- "golang.org/x/discovery/internal/testing/sample"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/postgres"
+ "golang.org/x/pkgsite/internal/testing/sample"
)
func TestFetchImportsDetails(t *testing.T) {
diff --git a/internal/frontend/latest_version.go b/internal/frontend/latest_version.go
index 30c65f3d..4bc09a57 100644
--- a/internal/frontend/latest_version.go
+++ b/internal/frontend/latest_version.go
@@ -8,9 +8,9 @@ import (
"context"
"errors"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/log"
)
// LatestVersion returns the latest version of the package or module.
diff --git a/internal/frontend/license.go b/internal/frontend/license.go
index a7a978d6..affa2c35 100644
--- a/internal/frontend/license.go
+++ b/internal/frontend/license.go
@@ -8,8 +8,8 @@ import (
"context"
"net/url"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/licenses"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/licenses"
)
// License contains information used for a single license section.
diff --git a/internal/frontend/module.go b/internal/frontend/module.go
index acb5b130..8567b6a1 100644
--- a/internal/frontend/module.go
+++ b/internal/frontend/module.go
@@ -12,9 +12,9 @@ import (
"net/http"
"strings"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/log"
)
// handleModuleDetails handles requests for non-stdlib module details pages. It
diff --git a/internal/frontend/overview.go b/internal/frontend/overview.go
index 5a3c0e58..03008e3a 100644
--- a/internal/frontend/overview.go
+++ b/internal/frontend/overview.go
@@ -16,8 +16,8 @@ import (
"github.com/microcosm-cc/bluemonday"
"github.com/russross/blackfriday/v2"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/stdlib"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/stdlib"
)
// OverviewDetails contains all of the data that the readme template
diff --git a/internal/frontend/overview_test.go b/internal/frontend/overview_test.go
index 4c966edf..a7db6f20 100644
--- a/internal/frontend/overview_test.go
+++ b/internal/frontend/overview_test.go
@@ -10,12 +10,12 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/postgres"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/stdlib"
- "golang.org/x/discovery/internal/testing/sample"
- "golang.org/x/discovery/internal/version"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/postgres"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/testing/sample"
+ "golang.org/x/pkgsite/internal/version"
)
func TestFetchOverviewDetails(t *testing.T) {
diff --git a/internal/frontend/package.go b/internal/frontend/package.go
index 340a7b3d..ba6b64d6 100644
--- a/internal/frontend/package.go
+++ b/internal/frontend/package.go
@@ -12,9 +12,9 @@ import (
"net/http"
"strings"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/log"
)
// handlePackageDetails handles requests for package details pages. It expects
diff --git a/internal/frontend/paginate.go b/internal/frontend/paginate.go
index 99d3fe8b..c651380a 100644
--- a/internal/frontend/paginate.go
+++ b/internal/frontend/paginate.go
@@ -9,7 +9,7 @@ import (
"net/url"
"strconv"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal/log"
)
// pagination holds information related to paginated display. It is intended to
diff --git a/internal/frontend/search.go b/internal/frontend/search.go
index 3ffb3512..1ac67e16 100644
--- a/internal/frontend/search.go
+++ b/internal/frontend/search.go
@@ -13,9 +13,9 @@ import (
"path"
"strings"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/log"
)
const defaultSearchLimit = 10
diff --git a/internal/frontend/search_test.go b/internal/frontend/search_test.go
index 0773cbe4..104499ba 100644
--- a/internal/frontend/search_test.go
+++ b/internal/frontend/search_test.go
@@ -10,11 +10,11 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/postgres"
- "golang.org/x/discovery/internal/testing/sample"
- "golang.org/x/discovery/internal/version"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/postgres"
+ "golang.org/x/pkgsite/internal/testing/sample"
+ "golang.org/x/pkgsite/internal/version"
)
func TestFetchSearchPage(t *testing.T) {
diff --git a/internal/frontend/server.go b/internal/frontend/server.go
index 6a188ec8..094b0fd3 100644
--- a/internal/frontend/server.go
+++ b/internal/frontend/server.go
@@ -17,13 +17,13 @@ import (
"time"
"github.com/go-redis/redis/v7"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/config"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/experiment"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/log"
- "golang.org/x/discovery/internal/middleware"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/config"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/experiment"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/log"
+ "golang.org/x/pkgsite/internal/middleware"
)
// Server can be installed to serve the go discovery frontend.
diff --git a/internal/frontend/server_test.go b/internal/frontend/server_test.go
index 2a6250e6..fa487d4a 100644
--- a/internal/frontend/server_test.go
+++ b/internal/frontend/server_test.go
@@ -14,14 +14,14 @@ import (
"testing"
"time"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/middleware"
- "golang.org/x/discovery/internal/postgres"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/testing/htmlcheck"
- "golang.org/x/discovery/internal/testing/pagecheck"
- "golang.org/x/discovery/internal/testing/sample"
"golang.org/x/net/html"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/middleware"
+ "golang.org/x/pkgsite/internal/postgres"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/testing/htmlcheck"
+ "golang.org/x/pkgsite/internal/testing/pagecheck"
+ "golang.org/x/pkgsite/internal/testing/sample"
)
const testTimeout = 5 * time.Second
diff --git a/internal/frontend/stdlib.go b/internal/frontend/stdlib.go
index d11550ce..fe16e637 100644
--- a/internal/frontend/stdlib.go
+++ b/internal/frontend/stdlib.go
@@ -9,10 +9,10 @@ import (
"net/http"
"strings"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/stdlib"
"golang.org/x/mod/module"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/stdlib"
)
// serveStdLib handles a request for a stdlib package or module.
diff --git a/internal/frontend/stdlib_test.go b/internal/frontend/stdlib_test.go
index 97e650b7..c0ad7cfd 100644
--- a/internal/frontend/stdlib_test.go
+++ b/internal/frontend/stdlib_test.go
@@ -7,7 +7,7 @@ package frontend
import (
"testing"
- "golang.org/x/discovery/internal"
+ "golang.org/x/pkgsite/internal"
)
func TestParseStdLibURLPath(t *testing.T) {
diff --git a/internal/frontend/tabs.go b/internal/frontend/tabs.go
index 9cd3b5b6..d1f06e60 100644
--- a/internal/frontend/tabs.go
+++ b/internal/frontend/tabs.go
@@ -11,8 +11,8 @@ import (
"net/url"
"strings"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/licenses"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/licenses"
)
// TabSettings defines tab-specific metadata.
diff --git a/internal/frontend/versions.go b/internal/frontend/versions.go
index d366a9b1..2ee7dfb4 100644
--- a/internal/frontend/versions.go
+++ b/internal/frontend/versions.go
@@ -10,12 +10,12 @@ import (
"path"
"strings"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/log"
- "golang.org/x/discovery/internal/stdlib"
- "golang.org/x/discovery/internal/version"
"golang.org/x/mod/module"
"golang.org/x/mod/semver"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/log"
+ "golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/version"
)
// VersionsDetails contains the hierarchy of version summary information used
diff --git a/internal/frontend/versions_test.go b/internal/frontend/versions_test.go
index 53d0c671..9d6c14e0 100644
--- a/internal/frontend/versions_test.go
+++ b/internal/frontend/versions_test.go
@@ -9,11 +9,11 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/postgres"
- "golang.org/x/discovery/internal/stdlib"
- "golang.org/x/discovery/internal/testing/sample"
- "golang.org/x/discovery/internal/version"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/postgres"
+ "golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/testing/sample"
+ "golang.org/x/pkgsite/internal/version"
)
var (
diff --git a/internal/index/index.go b/internal/index/index.go
index 3c2f1c71..446746fa 100644
--- a/internal/index/index.go
+++ b/internal/index/index.go
@@ -15,9 +15,9 @@ import (
"time"
"go.opencensus.io/plugin/ochttp"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
"golang.org/x/net/context/ctxhttp"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
)
// A Client is used by the worker service to communicate with the module index.
diff --git a/internal/index/index_test.go b/internal/index/index_test.go
index 95d65864..96aa4074 100644
--- a/internal/index/index_test.go
+++ b/internal/index/index_test.go
@@ -10,7 +10,7 @@ import (
"time"
"github.com/google/go-cmp/cmp"
- "golang.org/x/discovery/internal"
+ "golang.org/x/pkgsite/internal"
)
func TestGetVersions(t *testing.T) {
diff --git a/internal/index/test_helper.go b/internal/index/test_helper.go
index f74ae670..172a3eec 100644
--- a/internal/index/test_helper.go
+++ b/internal/index/test_helper.go
@@ -10,8 +10,8 @@ import (
"strconv"
"testing"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/testing/testhelper"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/testing/testhelper"
)
// SetupTestIndex creates a module index for testing using the given version
diff --git a/internal/log/log.go b/internal/log/log.go
index c9dbb72a..accdfdc0 100644
--- a/internal/log/log.go
+++ b/internal/log/log.go
@@ -15,9 +15,9 @@ import (
"sync"
"cloud.google.com/go/logging"
- "golang.org/x/discovery/internal/config"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/experiment"
+ "golang.org/x/pkgsite/internal/config"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/experiment"
)
var (
diff --git a/internal/middleware/caching.go b/internal/middleware/caching.go
index 5cb3b345..5bb20aed 100644
--- a/internal/middleware/caching.go
+++ b/internal/middleware/caching.go
@@ -18,7 +18,7 @@ import (
"go.opencensus.io/stats"
"go.opencensus.io/stats/view"
"go.opencensus.io/tag"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal/log"
)
var (
diff --git a/internal/middleware/experiment.go b/internal/middleware/experiment.go
index c915292e..b9d4e7ca 100644
--- a/internal/middleware/experiment.go
+++ b/internal/middleware/experiment.go
@@ -12,10 +12,10 @@ import (
"sync"
"time"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/experiment"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/experiment"
+ "golang.org/x/pkgsite/internal/log"
)
const experimentQueryParamKey = "experiment"
diff --git a/internal/middleware/experiment_test.go b/internal/middleware/experiment_test.go
index 273b3afb..5166b935 100644
--- a/internal/middleware/experiment_test.go
+++ b/internal/middleware/experiment_test.go
@@ -15,8 +15,8 @@ import (
"testing"
"time"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/experiment"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/experiment"
)
type testExperimentSource struct {
diff --git a/internal/middleware/godoc.go b/internal/middleware/godoc.go
index 624bc735..c06a853f 100644
--- a/internal/middleware/godoc.go
+++ b/internal/middleware/godoc.go
@@ -9,7 +9,7 @@ import (
"net/http"
"net/url"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal/log"
)
// GodocURLPlaceholder should be used as the value for any godoc.org URL in rendered
diff --git a/internal/middleware/latestversion.go b/internal/middleware/latestversion.go
index 95ec7621..b888445c 100644
--- a/internal/middleware/latestversion.go
+++ b/internal/middleware/latestversion.go
@@ -11,7 +11,7 @@ import (
"regexp"
"strings"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal/log"
)
const (
diff --git a/internal/middleware/panic.go b/internal/middleware/panic.go
index 056f341e..0c35c1ed 100644
--- a/internal/middleware/panic.go
+++ b/internal/middleware/panic.go
@@ -7,7 +7,7 @@ package middleware
import (
"net/http"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal/log"
)
// Panic returns a middleware that executes panicHandler on any panic
diff --git a/internal/middleware/quota.go b/internal/middleware/quota.go
index 74149fdf..52ba901b 100644
--- a/internal/middleware/quota.go
+++ b/internal/middleware/quota.go
@@ -16,7 +16,7 @@ import (
"go.opencensus.io/stats"
"go.opencensus.io/stats/view"
"go.opencensus.io/tag"
- "golang.org/x/discovery/internal/config"
+ "golang.org/x/pkgsite/internal/config"
"golang.org/x/time/rate"
)
diff --git a/internal/middleware/quota_test.go b/internal/middleware/quota_test.go
index 20dc1d74..d7aa341f 100644
--- a/internal/middleware/quota_test.go
+++ b/internal/middleware/quota_test.go
@@ -13,7 +13,7 @@ import (
"github.com/google/go-cmp/cmp"
"go.opencensus.io/stats/view"
- "golang.org/x/discovery/internal/config"
+ "golang.org/x/pkgsite/internal/config"
)
func TestQuota(t *testing.T) {
diff --git a/internal/middleware/requestlog.go b/internal/middleware/requestlog.go
index 7a15b171..2f678db1 100644
--- a/internal/middleware/requestlog.go
+++ b/internal/middleware/requestlog.go
@@ -13,7 +13,7 @@ import (
"time"
"cloud.google.com/go/logging"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal/log"
)
// Logger is the interface used to write request logs to GCP.
diff --git a/internal/middleware/secureheaders.go b/internal/middleware/secureheaders.go
index 3b7fd1fe..f5760877 100644
--- a/internal/middleware/secureheaders.go
+++ b/internal/middleware/secureheaders.go
@@ -10,7 +10,7 @@ import (
"net/http"
"strings"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal/log"
)
// NoncePlaceholder should be used as the value for nonces in rendered content.
diff --git a/internal/postgres/benchmarks_test.go b/internal/postgres/benchmarks_test.go
index c45bf7d1..05209e3b 100644
--- a/internal/postgres/benchmarks_test.go
+++ b/internal/postgres/benchmarks_test.go
@@ -8,9 +8,9 @@ import (
"context"
"testing"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/config"
- "golang.org/x/discovery/internal/database"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/config"
+ "golang.org/x/pkgsite/internal/database"
)
var testQueries = []string{
diff --git a/internal/postgres/details.go b/internal/postgres/details.go
index 0b4b4b27..ca9e8d49 100644
--- a/internal/postgres/details.go
+++ b/internal/postgres/details.go
@@ -15,11 +15,11 @@ import (
"strings"
"github.com/lib/pq"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/database"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/version"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/database"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/version"
)
// GetPackagesInModule returns packages contained in the module version
diff --git a/internal/postgres/details_test.go b/internal/postgres/details_test.go
index 2280af99..6addc34e 100644
--- a/internal/postgres/details_test.go
+++ b/internal/postgres/details_test.go
@@ -14,12 +14,12 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/testing/sample"
- "golang.org/x/discovery/internal/version"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/testing/sample"
+ "golang.org/x/pkgsite/internal/version"
)
func TestPostgres_GetVersionInfo_Latest(t *testing.T) {
diff --git a/internal/postgres/directory.go b/internal/postgres/directory.go
index eab33a6c..d186da81 100644
--- a/internal/postgres/directory.go
+++ b/internal/postgres/directory.go
@@ -11,10 +11,10 @@ import (
"sort"
"github.com/lib/pq"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/database"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/stdlib"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/database"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/stdlib"
)
// getDirectoryNew returns a directory from the database, along with all of the
diff --git a/internal/postgres/directory_test.go b/internal/postgres/directory_test.go
index b533509e..14576049 100644
--- a/internal/postgres/directory_test.go
+++ b/internal/postgres/directory_test.go
@@ -12,12 +12,12 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/stdlib"
- "golang.org/x/discovery/internal/testing/sample"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/testing/sample"
)
func TestGetDirectory(t *testing.T) {
diff --git a/internal/postgres/excluded.go b/internal/postgres/excluded.go
index 22e8ba7e..6177a2b8 100644
--- a/internal/postgres/excluded.go
+++ b/internal/postgres/excluded.go
@@ -8,8 +8,8 @@ import (
"context"
"database/sql"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/log"
)
// IsExcluded reports whether the path matches the excluded list.
diff --git a/internal/postgres/experiment.go b/internal/postgres/experiment.go
index 74219898..9e01be68 100644
--- a/internal/postgres/experiment.go
+++ b/internal/postgres/experiment.go
@@ -8,8 +8,8 @@ import (
"database/sql"
"fmt"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
)
// GetExperiments fetches all experiments in the database.
diff --git a/internal/postgres/experiment_test.go b/internal/postgres/experiment_test.go
index b52ca0f1..0eb52d74 100644
--- a/internal/postgres/experiment_test.go
+++ b/internal/postgres/experiment_test.go
@@ -9,7 +9,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
- "golang.org/x/discovery/internal"
+ "golang.org/x/pkgsite/internal"
)
func TestGetActiveExperiments(t *testing.T) {
diff --git a/internal/postgres/insert_module.go b/internal/postgres/insert_module.go
index 8992b787..71336e71 100644
--- a/internal/postgres/insert_module.go
+++ b/internal/postgres/insert_module.go
@@ -14,15 +14,15 @@ import (
"strings"
"github.com/lib/pq"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/database"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/experiment"
- "golang.org/x/discovery/internal/log"
- "golang.org/x/discovery/internal/stdlib"
- "golang.org/x/discovery/internal/version"
"golang.org/x/mod/module"
"golang.org/x/mod/semver"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/database"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/experiment"
+ "golang.org/x/pkgsite/internal/log"
+ "golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/version"
)
// InsertModule inserts a version into the database using
diff --git a/internal/postgres/insert_module_test.go b/internal/postgres/insert_module_test.go
index 6130071d..780099e7 100644
--- a/internal/postgres/insert_module_test.go
+++ b/internal/postgres/insert_module_test.go
@@ -14,12 +14,12 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/experiment"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/testing/sample"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/experiment"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/testing/sample"
)
func TestInsertModule(t *testing.T) {
diff --git a/internal/postgres/package.go b/internal/postgres/package.go
index 2706684e..1880f9a3 100644
--- a/internal/postgres/package.go
+++ b/internal/postgres/package.go
@@ -10,10 +10,10 @@ import (
"fmt"
"github.com/lib/pq"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/database"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/stdlib"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/database"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/stdlib"
)
// GetPackage returns the a package from the database with the corresponding
diff --git a/internal/postgres/package_test.go b/internal/postgres/package_test.go
index 43ee8a08..1cb80dfe 100644
--- a/internal/postgres/package_test.go
+++ b/internal/postgres/package_test.go
@@ -11,12 +11,12 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/stdlib"
- "golang.org/x/discovery/internal/testing/sample"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/testing/sample"
)
func TestGetPackage(t *testing.T) {
diff --git a/internal/postgres/parent_directories_test.go b/internal/postgres/parent_directories_test.go
index 4ddc721d..b33441ae 100644
--- a/internal/postgres/parent_directories_test.go
+++ b/internal/postgres/parent_directories_test.go
@@ -10,8 +10,8 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/lib/pq"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/testing/sample"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/testing/sample"
)
func TestToTsvectorParentDirectoriesStoredProcedure(t *testing.T) {
diff --git a/internal/postgres/postgres.go b/internal/postgres/postgres.go
index 351c811b..7d8ef8ef 100644
--- a/internal/postgres/postgres.go
+++ b/internal/postgres/postgres.go
@@ -5,7 +5,7 @@
package postgres
import (
- "golang.org/x/discovery/internal/database"
+ "golang.org/x/pkgsite/internal/database"
)
type DB struct {
diff --git a/internal/postgres/search.go b/internal/postgres/search.go
index bcf1cd96..e41a69ee 100644
--- a/internal/postgres/search.go
+++ b/internal/postgres/search.go
@@ -17,12 +17,12 @@ import (
"go.opencensus.io/stats"
"go.opencensus.io/stats/view"
"go.opencensus.io/tag"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/database"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/log"
- "golang.org/x/discovery/internal/stdlib"
"golang.org/x/mod/semver"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/database"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/log"
+ "golang.org/x/pkgsite/internal/stdlib"
)
var (
diff --git a/internal/postgres/search_test.go b/internal/postgres/search_test.go
index 24460c57..16720587 100644
--- a/internal/postgres/search_test.go
+++ b/internal/postgres/search_test.go
@@ -20,9 +20,9 @@ import (
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/lib/pq"
"go.opencensus.io/stats/view"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/testing/sample"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/testing/sample"
)
func TestPathTokens(t *testing.T) {
diff --git a/internal/postgres/test_helper.go b/internal/postgres/test_helper.go
index 7861ebc0..e37e7535 100644
--- a/internal/postgres/test_helper.go
+++ b/internal/postgres/test_helper.go
@@ -14,12 +14,12 @@ import (
"testing"
"github.com/golang-migrate/migrate/v4"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/database"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/testing/dbtest"
- "golang.org/x/discovery/internal/testing/sample"
- "golang.org/x/discovery/internal/testing/testhelper"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/database"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/testing/dbtest"
+ "golang.org/x/pkgsite/internal/testing/sample"
+ "golang.org/x/pkgsite/internal/testing/testhelper"
// imported to register the postgres migration driver
_ "github.com/golang-migrate/migrate/v4/database/postgres"
diff --git a/internal/postgres/version_map.go b/internal/postgres/version_map.go
index 7b920e54..cc5bd6e1 100644
--- a/internal/postgres/version_map.go
+++ b/internal/postgres/version_map.go
@@ -8,9 +8,9 @@ import (
"context"
"database/sql"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/version"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/version"
)
// UpsertVersionMap inserts a version_map entry into the database.
diff --git a/internal/postgres/version_map_test.go b/internal/postgres/version_map_test.go
index 3cbea2f3..44e68527 100644
--- a/internal/postgres/version_map_test.go
+++ b/internal/postgres/version_map_test.go
@@ -9,8 +9,8 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/testing/sample"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/testing/sample"
)
func TestReadAndWriteVersionMap(t *testing.T) {
diff --git a/internal/postgres/versionstate.go b/internal/postgres/versionstate.go
index 48d7883b..b59f39a9 100644
--- a/internal/postgres/versionstate.go
+++ b/internal/postgres/versionstate.go
@@ -14,12 +14,12 @@ import (
"github.com/lib/pq"
"go.opencensus.io/trace"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/database"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/log"
- "golang.org/x/discovery/internal/version"
"golang.org/x/mod/semver"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/database"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/log"
+ "golang.org/x/pkgsite/internal/version"
)
// InsertIndexVersions inserts new versions into the module_version_states
diff --git a/internal/postgres/versionstate_test.go b/internal/postgres/versionstate_test.go
index 7acadd37..3dd5bc79 100644
--- a/internal/postgres/versionstate_test.go
+++ b/internal/postgres/versionstate_test.go
@@ -13,8 +13,8 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/testing/sample"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/testing/sample"
)
func TestModuleVersionState(t *testing.T) {
diff --git a/internal/proxy/client.go b/internal/proxy/client.go
index c95f7210..1d224891 100644
--- a/internal/proxy/client.go
+++ b/internal/proxy/client.go
@@ -20,10 +20,10 @@ import (
"time"
"go.opencensus.io/plugin/ochttp"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
"golang.org/x/mod/module"
"golang.org/x/net/context/ctxhttp"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
)
// A Client is used by the fetch service to communicate with a module
diff --git a/internal/proxy/client_test.go b/internal/proxy/client_test.go
index ebd5540a..ccb60f1b 100644
--- a/internal/proxy/client_test.go
+++ b/internal/proxy/client_test.go
@@ -11,9 +11,9 @@ import (
"time"
"github.com/google/go-cmp/cmp"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/testing/testhelper"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/testing/testhelper"
)
const testTimeout = 5 * time.Second
diff --git a/internal/proxy/test_helper.go b/internal/proxy/test_helper.go
index 2ea4d155..a8272b6f 100644
--- a/internal/proxy/test_helper.go
+++ b/internal/proxy/test_helper.go
@@ -14,8 +14,8 @@ import (
"testing"
"time"
- "golang.org/x/discovery/internal/testing/testhelper"
"golang.org/x/mod/semver"
+ "golang.org/x/pkgsite/internal/testing/testhelper"
)
// TestModule represents a module version used to generate testdata.
diff --git a/internal/proxydatasource/datasource.go b/internal/proxydatasource/datasource.go
index c679b25f..98fb5a01 100644
--- a/internal/proxydatasource/datasource.go
+++ b/internal/proxydatasource/datasource.go
@@ -16,14 +16,14 @@ import (
"sync"
"time"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/fetch"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/proxy"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/version"
"golang.org/x/mod/semver"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/fetch"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/proxy"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/version"
)
var _ internal.DataSource = (*DataSource)(nil)
diff --git a/internal/proxydatasource/datasource_test.go b/internal/proxydatasource/datasource_test.go
index 0fcf1671..d99b7d4d 100644
--- a/internal/proxydatasource/datasource_test.go
+++ b/internal/proxydatasource/datasource_test.go
@@ -11,12 +11,12 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/proxy"
- "golang.org/x/discovery/internal/testing/sample"
- "golang.org/x/discovery/internal/testing/testhelper"
- "golang.org/x/discovery/internal/version"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/proxy"
+ "golang.org/x/pkgsite/internal/testing/sample"
+ "golang.org/x/pkgsite/internal/testing/testhelper"
+ "golang.org/x/pkgsite/internal/version"
)
func setup(t *testing.T) (context.Context, *DataSource, func()) {
diff --git a/internal/queue/queue.go b/internal/queue/queue.go
index 39a03203..9242595d 100644
--- a/internal/queue/queue.go
+++ b/internal/queue/queue.go
@@ -14,11 +14,11 @@ import (
"time"
cloudtasks "cloud.google.com/go/cloudtasks/apiv2"
- "golang.org/x/discovery/internal/config"
- "golang.org/x/discovery/internal/log"
- "golang.org/x/discovery/internal/postgres"
- "golang.org/x/discovery/internal/proxy"
- "golang.org/x/discovery/internal/source"
+ "golang.org/x/pkgsite/internal/config"
+ "golang.org/x/pkgsite/internal/log"
+ "golang.org/x/pkgsite/internal/postgres"
+ "golang.org/x/pkgsite/internal/proxy"
+ "golang.org/x/pkgsite/internal/source"
taskspb "google.golang.org/genproto/googleapis/cloud/tasks/v2"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
diff --git a/internal/secrets/secrets.go b/internal/secrets/secrets.go
index 91dc526d..0f90e688 100644
--- a/internal/secrets/secrets.go
+++ b/internal/secrets/secrets.go
@@ -13,7 +13,7 @@ import (
cloudkms "cloud.google.com/go/kms/apiv1"
"cloud.google.com/go/storage"
- "golang.org/x/discovery/internal/derrors"
+ "golang.org/x/pkgsite/internal/derrors"
kmspb "google.golang.org/genproto/googleapis/cloud/kms/v1"
)
diff --git a/internal/source/meta-tags.go b/internal/source/meta-tags.go
index 028ebce6..aa13f46c 100644
--- a/internal/source/meta-tags.go
+++ b/internal/source/meta-tags.go
@@ -11,7 +11,7 @@ import (
"io"
"strings"
- "golang.org/x/discovery/internal/derrors"
+ "golang.org/x/pkgsite/internal/derrors"
)
// This code adapted from https://go.googlesource.com/gddo/+/refs/heads/master/gosrc/gosrc.go.
diff --git a/internal/source/source.go b/internal/source/source.go
index 3279497c..b9b98301 100644
--- a/internal/source/source.go
+++ b/internal/source/source.go
@@ -33,11 +33,11 @@ import (
"time"
"go.opencensus.io/plugin/ochttp"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/log"
- "golang.org/x/discovery/internal/stdlib"
- "golang.org/x/discovery/internal/version"
"golang.org/x/net/context/ctxhttp"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/log"
+ "golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/version"
)
// Info holds source information about a module, used to generate URLs referring
diff --git a/internal/stdlib/stdlib.go b/internal/stdlib/stdlib.go
index a2e47992..ba3033c7 100644
--- a/internal/stdlib/stdlib.go
+++ b/internal/stdlib/stdlib.go
@@ -21,9 +21,9 @@ import (
"strings"
"time"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/testing/testhelper"
"golang.org/x/mod/semver"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/testing/testhelper"
"gopkg.in/src-d/go-billy.v4/osfs"
"gopkg.in/src-d/go-git.v4"
diff --git a/internal/testing/integration/frontend_test.go b/internal/testing/integration/frontend_test.go
index e08dffa9..b8709388 100644
--- a/internal/testing/integration/frontend_test.go
+++ b/internal/testing/integration/frontend_test.go
@@ -11,14 +11,14 @@ import (
"testing"
"time"
- "golang.org/x/discovery/internal/fetch"
- "golang.org/x/discovery/internal/frontend"
- "golang.org/x/discovery/internal/middleware"
- "golang.org/x/discovery/internal/postgres"
- "golang.org/x/discovery/internal/proxy"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/testing/htmlcheck"
- "golang.org/x/discovery/internal/testing/testhelper"
+ "golang.org/x/pkgsite/internal/fetch"
+ "golang.org/x/pkgsite/internal/frontend"
+ "golang.org/x/pkgsite/internal/middleware"
+ "golang.org/x/pkgsite/internal/postgres"
+ "golang.org/x/pkgsite/internal/proxy"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/testing/htmlcheck"
+ "golang.org/x/pkgsite/internal/testing/testhelper"
)
var (
diff --git a/internal/testing/integration/integration_test.go b/internal/testing/integration/integration_test.go
index f2bb9ac1..03c6f2e0 100644
--- a/internal/testing/integration/integration_test.go
+++ b/internal/testing/integration/integration_test.go
@@ -16,16 +16,16 @@ import (
"github.com/alicebob/miniredis/v2"
"github.com/go-redis/redis/v7"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/config"
- "golang.org/x/discovery/internal/frontend"
- "golang.org/x/discovery/internal/index"
- "golang.org/x/discovery/internal/postgres"
- "golang.org/x/discovery/internal/proxy"
- "golang.org/x/discovery/internal/queue"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/testing/testhelper"
- "golang.org/x/discovery/internal/worker"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/config"
+ "golang.org/x/pkgsite/internal/frontend"
+ "golang.org/x/pkgsite/internal/index"
+ "golang.org/x/pkgsite/internal/postgres"
+ "golang.org/x/pkgsite/internal/proxy"
+ "golang.org/x/pkgsite/internal/queue"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/testing/testhelper"
+ "golang.org/x/pkgsite/internal/worker"
)
var testDB *postgres.DB
diff --git a/internal/testing/pagecheck/pagecheck.go b/internal/testing/pagecheck/pagecheck.go
index 8ef62c41..94dfe3b1 100644
--- a/internal/testing/pagecheck/pagecheck.go
+++ b/internal/testing/pagecheck/pagecheck.go
@@ -12,8 +12,8 @@ import (
"path"
"regexp"
- "golang.org/x/discovery/internal/stdlib"
- "golang.org/x/discovery/internal/testing/htmlcheck"
+ "golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/testing/htmlcheck"
)
// Page describes a discovery site web page for a package, module or directory.
diff --git a/internal/testing/sample/sample.go b/internal/testing/sample/sample.go
index 9a6a1620..cb07fedc 100644
--- a/internal/testing/sample/sample.go
+++ b/internal/testing/sample/sample.go
@@ -14,10 +14,10 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/google/licensecheck"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/version"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/version"
)
// These sample values can be used to construct test cases.
diff --git a/internal/worker/completion.go b/internal/worker/completion.go
index 9ef227fb..5ba8a029 100644
--- a/internal/worker/completion.go
+++ b/internal/worker/completion.go
@@ -13,10 +13,10 @@ import (
"time"
"github.com/go-redis/redis/v7"
- "golang.org/x/discovery/internal/complete"
- "golang.org/x/discovery/internal/database"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/log"
+ "golang.org/x/pkgsite/internal/complete"
+ "golang.org/x/pkgsite/internal/database"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/log"
)
const popularCutoff = 50
diff --git a/internal/worker/completion_test.go b/internal/worker/completion_test.go
index 5912dd51..b19313d2 100644
--- a/internal/worker/completion_test.go
+++ b/internal/worker/completion_test.go
@@ -10,9 +10,9 @@ import (
"github.com/alicebob/miniredis/v2"
"github.com/go-redis/redis/v7"
- "golang.org/x/discovery/internal/complete"
- "golang.org/x/discovery/internal/postgres"
- "golang.org/x/discovery/internal/testing/sample"
+ "golang.org/x/pkgsite/internal/complete"
+ "golang.org/x/pkgsite/internal/postgres"
+ "golang.org/x/pkgsite/internal/testing/sample"
)
func TestUpdateRedisIndexes(t *testing.T) {
diff --git a/internal/worker/fetch.go b/internal/worker/fetch.go
index 460fc368..4e97acf2 100644
--- a/internal/worker/fetch.go
+++ b/internal/worker/fetch.go
@@ -11,17 +11,17 @@ import (
"time"
"go.opencensus.io/trace"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/config"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/experiment"
- "golang.org/x/discovery/internal/fetch"
- "golang.org/x/discovery/internal/log"
- "golang.org/x/discovery/internal/postgres"
- "golang.org/x/discovery/internal/proxy"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/xcontext"
"golang.org/x/mod/semver"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/config"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/experiment"
+ "golang.org/x/pkgsite/internal/fetch"
+ "golang.org/x/pkgsite/internal/log"
+ "golang.org/x/pkgsite/internal/postgres"
+ "golang.org/x/pkgsite/internal/proxy"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/xcontext"
)
// fetchTimeout bounds the time allowed for fetching a single module. It is
diff --git a/internal/worker/fetch_test.go b/internal/worker/fetch_test.go
index 0d13c213..f96ddd41 100644
--- a/internal/worker/fetch_test.go
+++ b/internal/worker/fetch_test.go
@@ -16,15 +16,15 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/fetch"
- "golang.org/x/discovery/internal/licenses"
- "golang.org/x/discovery/internal/postgres"
- "golang.org/x/discovery/internal/proxy"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/stdlib"
- "golang.org/x/discovery/internal/testing/testhelper"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/fetch"
+ "golang.org/x/pkgsite/internal/licenses"
+ "golang.org/x/pkgsite/internal/postgres"
+ "golang.org/x/pkgsite/internal/proxy"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/stdlib"
+ "golang.org/x/pkgsite/internal/testing/testhelper"
)
var sourceTimeout = 1 * time.Second
diff --git a/internal/worker/server.go b/internal/worker/server.go
index f9902cb4..71c60724 100644
--- a/internal/worker/server.go
+++ b/internal/worker/server.go
@@ -21,17 +21,17 @@ import (
"cloud.google.com/go/errorreporting"
"github.com/go-redis/redis/v7"
"go.opencensus.io/trace"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/config"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/index"
- "golang.org/x/discovery/internal/log"
- "golang.org/x/discovery/internal/middleware"
- "golang.org/x/discovery/internal/postgres"
- "golang.org/x/discovery/internal/proxy"
- "golang.org/x/discovery/internal/queue"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/stdlib"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/config"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/index"
+ "golang.org/x/pkgsite/internal/log"
+ "golang.org/x/pkgsite/internal/middleware"
+ "golang.org/x/pkgsite/internal/postgres"
+ "golang.org/x/pkgsite/internal/proxy"
+ "golang.org/x/pkgsite/internal/queue"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/stdlib"
"golang.org/x/sync/errgroup"
)
diff --git a/internal/worker/server_test.go b/internal/worker/server_test.go
index b8e314a5..c8ee42b5 100644
--- a/internal/worker/server_test.go
+++ b/internal/worker/server_test.go
@@ -17,15 +17,15 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.opencensus.io/trace"
- "golang.org/x/discovery/internal"
- "golang.org/x/discovery/internal/config"
- "golang.org/x/discovery/internal/derrors"
- "golang.org/x/discovery/internal/index"
- "golang.org/x/discovery/internal/postgres"
- "golang.org/x/discovery/internal/proxy"
- "golang.org/x/discovery/internal/queue"
- "golang.org/x/discovery/internal/source"
- "golang.org/x/discovery/internal/testing/sample"
+ "golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/config"
+ "golang.org/x/pkgsite/internal/derrors"
+ "golang.org/x/pkgsite/internal/index"
+ "golang.org/x/pkgsite/internal/postgres"
+ "golang.org/x/pkgsite/internal/proxy"
+ "golang.org/x/pkgsite/internal/queue"
+ "golang.org/x/pkgsite/internal/source"
+ "golang.org/x/pkgsite/internal/testing/sample"
)
const testTimeout = 60 * time.Second