[mirror] Home of the pkg.go.dev website
Перейти к файлу
Jonathan Amsterdam c76866da88 internal/frontend: group imported-by paths
Instead of displaying the paths imported by a module as a flat list,
use <details> elements to display a tree.

Make tree nodes for (roughly) "account" and "repo", so that
"github.com/google" is one level of the tree, and
"github.com/google/somerepo" is the next level. Don't group beyond
that on the assumption that users would want to see all the importing
packages in a repo as a flat list.

Also, get rid of pagination on the query. Instead use a large limit,
and only display paths up to that limit.

Fixes b/139411420.

Change-Id: I55e030e5f901dacf854f2e7f585a444d089f6ea1
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/537581
Reviewed-by: Julie Qiu <julieqiu@google.com>
2020-03-27 16:46:42 -04:00
cmd internal/frontend,internal/etl: finish server installers 2020-03-27 16:46:42 -04:00
content/static internal/frontend: group imported-by paths 2020-03-27 16:46:42 -04:00
internal internal/frontend: group imported-by paths 2020-03-27 16:46:42 -04:00
migrations migrations: create imports_unique table 2020-03-27 16:46:42 -04:00
.gitignore discovery: add my environment file to .gitignore 2020-03-27 16:46:38 -04:00
.prettierrc.yaml all.bash: add new linters and fix lint errors 2020-03-27 16:46:40 -04:00
CONTRIBUTING.md discovery: make small improvements for developer ergonomics 2020-03-27 16:46:34 -04:00
LICENSE discovery: update LICENSE formatting 2020-03-27 16:46:33 -04:00
PATENTS discovery: initial boilerplate 2019-01-28 17:05:04 -05:00
README.md discovery: created initial models 2020-03-27 16:46:28 -04:00
all.bash all.bash: run tests on Cloud Build 2020-03-27 16:46:42 -04:00
go.mod internal/derrors: switch to using xerrors 2020-03-27 16:46:41 -04:00
go.sum internal/derrors: switch to using xerrors 2020-03-27 16:46:41 -04:00

README.md

Go Module Discovery Site

Getting Started

Requirements

Migrations

Migrations are managed with the golang-migrate/migrate CLI tool.

To run all the migrations:

migrate -source file:migrations -database "postgres://localhost:5432/discovery-database?sslmode=disable" up

To create a new migration:

migrate create -ext sql -dir migrations -seq <title>

This creates two empty files in /migrations:

{version}_{title}.up.sql
{version}_{title}.down.sql

The two migration files are used to migrate "up" to the specified version from the previous version, and to migrate "down" to the previous version. See golang-migrate/migrate/MIGRATIONS.md for details.