[mirror] Home of the pkg.go.dev website
Перейти к файлу
Channing Kimble-Brown c2e51712c3 internal/postgres: add GetLatestPackageForPaths
This change adds GetLatestPackageForPaths which returns the latest
package associated with each path in a list of strings. This method
will eventually be used to get the packages queried by search results.

Updates b/124308701
Fixes b/126714352

Change-Id: I2b6e86aec7b5ba82ed0e45db52784d3cde1b8074
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/439699
Reviewed-by: Julie Qiu <julieqiu@google.com>
2020-03-27 16:46:34 -04:00
cmd internal/fetch,internal/proxy: encode module paths in proxy requests 2020-03-27 16:46:34 -04:00
content/static cmd/fetch,content: change default proxy url; link to path in details header 2020-03-27 16:46:34 -04:00
internal internal/postgres: add GetLatestPackageForPaths 2020-03-27 16:46:34 -04:00
migrations migrations: add missing semicolon to migration 000017 2020-03-27 16:46:34 -04:00
.gitignore internal/proxy: add zip files to .gitignore 2020-03-27 16:46:34 -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 discovery: update all.bash to finish even if no files are staged 2020-03-27 16:46:34 -04:00
go.mod internal/frontend: display READMEs written in markdown as HTML 2020-03-27 16:46:34 -04:00
go.sum discovery: make small improvements for developer ergonomics 2020-03-27 16:46:34 -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.