README

Pkg.go.dev

Go Reference

A site for discovering Go packages

Pkg.go.dev is a website for discovering and evaluating Go packages and modules.

You can check it out at https://pkg.go.dev.

Roadmap

Pkg.go.dev launched in November 2019, and is currently under active development by the Go team.

Here's what we are currently working on:

  • Design updates: We have some design changes planned for pkg.go.dev, to address UX feedback that we have received. You can expect a more cohesive search and navigation experience coming soon. We plan to share these designs for feedback once they are ready.

  • Godoc.org redirect: Longer term, we are working towards redirecting godoc.org traffic to pkg.go.dev. We know that there are features available on godoc.org that users want to see on pkg.go.dev, and we want to ensure that we address these. We’ve been keeping track of issues related to redirecting godoc.org traffic on Go issue #39144. These issues will be prioritized in the next few months. We also plan to continue improving our license detection algorithm.

  • Search improvements: We’ll be improving our search experience based on feedback in Go issue #37810, to make it easier for users to find the dependencies they are looking for and make better decisions around which ones to import.

We encourage everyone to begin using pkg.go.dev today for all of their needs and to file feedback! You can redirect all of your requests from godoc.org to pkg.go.dev, by clicking Always use pkg.go.dev at the top of any page on godoc.org.

Issues

If you want to report a bug or have a feature suggestion, please first check the known issues to see if your issue is already being discussed. If an issue does not already exist, feel free to file an issue.

For answers to frequently asked questions, see go.dev/about.

You can also chat with us on the #tools slack channel on the Gophers slack.

Contributing

We would love your help!

Our canonical Git repository is located at go.googlesource.com/pkgsite. There is a mirror of the repository at github.com/golang/pkgsite.

To contribute, please read our contributing guide.

License

Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.

Expand ▾ Collapse ▴

Directories

Path Synopsis
cmd
frontend
The frontend runs a service to serve user-facing traffic.
The frontend runs a service to serve user-facing traffic.
internal/cmdconfig
Package cmdconfig contains functions for configuring commands.
Package cmdconfig contains functions for configuring commands.
internal/testing/stdlibsymbol
stdlibsymbol compares data from the symbol_history table with the stdlib API data at https://go.googlesource.com/go/+/refs/heads/master/api.
stdlibsymbol compares data from the symbol_history table with the stdlib API data at https://go.googlesource.com/go/+/refs/heads/master/api.
pkgsite
This is a work in progress.
This is a work in progress.
prober
The prober hits the frontend with a fixed set of URLs.
The prober hits the frontend with a fixed set of URLs.
worker
The worker command runs a service with the primary job of fetching modules from a proxy and writing them to the database.
The worker command runs a service with the primary job of fetching modules from a proxy and writing them to the database.
devtools
cmd/create_experiment_config
Command create_experiment_config creates an experiment.yaml file, which will set a rollout of 100 for all experiments.
Command create_experiment_config creates an experiment.yaml file, which will set a rollout of 100 for all experiments.
cmd/csphash
csphash computes the hashes of script tags in files, and checks that they are added to our content security policy.
csphash computes the hashes of script tags in files, and checks that they are added to our content security policy.
cmd/css
Command css appends CSS styles to content/static/stylesheet.css.
Command css appends CSS styles to content/static/stylesheet.css.
Package internal contains data used through x/pkgsite.
Package internal contains data used through x/pkgsite.
auth
Package auth authorizes programs to make HTTP requests to the discovery site.
Package auth authorizes programs to make HTTP requests to the discovery site.
cache
Package cache implements a redis-based page cache for pkgsite.
Package cache implements a redis-based page cache for pkgsite.
config
Package config resolves shared configuration for Go Discovery services, and provides functions to access this configuration.
Package config resolves shared configuration for Go Discovery services, and provides functions to access this configuration.
config/dynconfig
Package dynconfig supports dynamic configuration for pkgsite services.
Package dynconfig supports dynamic configuration for pkgsite services.
cookie
Package cookie is used to get and set HTTP cookies.
Package cookie is used to get and set HTTP cookies.
database
Package database adds some useful functionality to a sql.DB.
Package database adds some useful functionality to a sql.DB.
dcensus
Package dcensus provides functionality for debug instrumentation.
Package dcensus provides functionality for debug instrumentation.
derrors
Package derrors defines internal error values to categorize the different types error semantics we support.
Package derrors defines internal error values to categorize the different types error semantics we support.
experiment
Package experiment provides functionality for experiments.
Package experiment provides functionality for experiments.
fetch
Package fetch provides a way to fetch modules from a proxy.
Package fetch provides a way to fetch modules from a proxy.
frontend
Package frontend provides functionality for running the pkg.go.dev site.
Package frontend provides functionality for running the pkg.go.dev site.
godoc
Package godoc is for rendering Go documentation.
Package godoc is for rendering Go documentation.
godoc/codec
Package codec implements the general-purpose part of an encoder for Go values.
Package codec implements the general-purpose part of an encoder for Go values.
godoc/dochtml
Package dochtml renders Go package documentation into HTML.
Package dochtml renders Go package documentation into HTML.
godoc/dochtml/internal/render
Package render formats Go documentation as HTML.
Package render formats Go documentation as HTML.
godoc/internal/doc
Package doc extracts source code documentation from a Go AST.
Package doc extracts source code documentation from a Go AST.
index
Package index provides a client for communicating with the module index.
Package index provides a client for communicating with the module index.
licenses
Package licenses detects licenses and determines whether they are redistributable.
Package licenses detects licenses and determines whether they are redistributable.
localdatasource
Package localdatasource implements an in-memory internal.DataSource used to load and display documentation for local modules that are not available via a proxy.
Package localdatasource implements an in-memory internal.DataSource used to load and display documentation for local modules that are not available via a proxy.
log
Package log supports structured and unstructured logging with levels.
Package log supports structured and unstructured logging with levels.
middleware
Package middleware implements a simple middleware pattern for http handlers, along with implementations for some common middlewares.
Package middleware implements a simple middleware pattern for http handlers, along with implementations for some common middlewares.
poller
Package poller supports periodic polling to load a value.
Package poller supports periodic polling to load a value.
postgres
Package postgres provides functionality for reading and writing to the postgres database.
Package postgres provides functionality for reading and writing to the postgres database.
proxy
Package proxy provides a client for interacting with a proxy.
Package proxy provides a client for interacting with a proxy.
proxydatasource
Package proxydatasource implements an internal.DataSource backed solely by a proxy instance.
Package proxydatasource implements an internal.DataSource backed solely by a proxy instance.
queue
Package queue provides queue implementations that can be used for asynchronous scheduling of fetch actions.
Package queue provides queue implementations that can be used for asynchronous scheduling of fetch actions.
secrets
Package secrets is used to interact with secretmanager.
Package secrets is used to interact with secretmanager.
source
Package source constructs public URLs that link to the source files in a module.
Package source constructs public URLs that link to the source files in a module.
stdlib
Package stdlib supports special handling of the Go standard library.
Package stdlib supports special handling of the Go standard library.
testing/dbtest
Package dbtest supports testing with a database.
Package dbtest supports testing with a database.
testing/htmlcheck
Package htmlcheck provides a set of functions that check for properties of a parsed HTML document.
Package htmlcheck provides a set of functions that check for properties of a parsed HTML document.
testing/pagecheck
Package pagecheck implements HTML checkers for discovery site pages.
Package pagecheck implements HTML checkers for discovery site pages.
testing/sample
Package sample provides functionality for generating sample values of the types contained in the internal package.
Package sample provides functionality for generating sample values of the types contained in the internal package.
testing/testhelper
Package testhelper provides shared functionality and constants to be used in Discovery tests.
Package testhelper provides shared functionality and constants to be used in Discovery tests.
version
Package version handles version types.
Package version handles version types.
worker
Package worker provides functionality for running a worker service.
Package worker provides functionality for running a worker service.
xcontext
Package xcontext is a package to offer the extra functionality we need from contexts that is not available from the standard context package.
Package xcontext is a package to offer the extra functionality we need from contexts that is not available from the standard context package.