зеркало из https://github.com/golang/pkgsite.git
c76866da88
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> |
||
---|---|---|
cmd | ||
content/static | ||
internal | ||
migrations | ||
.gitignore | ||
.prettierrc.yaml | ||
CONTRIBUTING.md | ||
LICENSE | ||
PATENTS | ||
README.md | ||
all.bash | ||
go.mod | ||
go.sum |
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.