aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres
diff options
context:
space:
mode:
authorJulie Qiu <julie@golang.org>2020-04-21 16:51:29 -0400
committerJulie Qiu <julieqiu@google.com>2020-04-23 16:18:43 +0000
commit19794c8aeb90c0a8f17c5ee1ed187bd005a1fd40 (patch)
tree6552b4c49b886aff9633fa4a304149f11768403a /internal/postgres
parent5599c558a14efd44b957ef0da0f49333c13bced5 (diff)
downloadgo-x-pkgsite-19794c8aeb90c0a8f17c5ee1ed187bd005a1fd40.tar.xz
all: rename module to golang.org/x/pkgsite
golang.org/x/discovery is renamed to golang.org/x/pkgsite. When the repository is open sourced, it will be hosted at go.googlesource.com/pkgsite. Change-Id: Ifc3b45b771a385b99179e785447f2a87afcacf87 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/724273 Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'internal/postgres')
-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
21 files changed, 81 insertions, 81 deletions
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) {