pkgsite

module
v0.0.0-...-ddbbf7b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: BSD-3-Clause

README

golang.org/x/pkgsite

This repository hosts the source code of the pkg.go.dev website, and pkgsite, a documentation server program.

Go Reference

pkg.go.dev: 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.

pkgsite: a documentation server

pkgsite program extracts and generates documentation for Go projects.

Example usage:

$ go install golang.org/x/pkgsite/cmd/pkgsite@latest
$ cd myproject
$ pkgsite -open .

For more information, see the pkgsite documentation.

Requirements

Pkgsite requires Go 1.19 to run. The last commit that works with Go 1.18 is 9ffe8b928e4fbd3ff7dcf984254629a47f8b6e63. The last commit that works with Go 1.17 is 4d836c6a652cde92f433967680dfd6171a91ec12.

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 pkg.go.dev/about.

You can also chat with us on the #pkgsite 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.

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.
pkgsite
Pkgsite extracts and generates documentation for Go programs.
Pkgsite extracts and generates documentation for Go programs.
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.
cmd/db
The seeddb command is used to populates a database with an initial set of modules.
The seeddb command is used to populates a database with an initial set of modules.
cmd/dumpdoc
The dumpdoc command writes documentation and readmes for packages in search_documents to a gob file.
The dumpdoc command writes documentation and readmes for packages in search_documents to a gob file.
cmd/seeddb
The seeddb command populates a database with an initial set of modules.
The seeddb command populates a database with an initial set of modules.
cmd/static
Command static compiles TypeScript files into minified JavaScript files and creates linked sourcemaps.
Command static compiles TypeScript files into minified JavaScript files and creates linked sourcemaps.
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.
browser
Package browser provides utilities for interacting with users' browsers.
Package browser provides utilities for interacting with users' browsers.
cache
Package cache implements a redis-based page cache for pkgsite.
Package cache implements a redis-based page cache for pkgsite.
config
Package config provides the definition of the configuration for the frontend.
Package config provides the definition of the configuration for the frontend.
config/dynconfig
Package dynconfig supports dynamic configuration for pkgsite services.
Package dynconfig supports dynamic configuration for pkgsite services.
config/serverconfig
Package serverconfig resolves shared configuration for Go Discovery services.
Package serverconfig resolves shared configuration for Go Discovery 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.
fetchdatasource
Package fetchdatasource provides an internal.DataSource implementation that fetches modules (rather than reading them from a database).
Package fetchdatasource provides an internal.DataSource implementation that fetches modules (rather than reading them from a database).
frontend
Package frontend provides functionality for running the pkg.go.dev site.
Package frontend provides functionality for running the pkg.go.dev site.
frontend/client
Package client provides a client for interacting with the frontend.
Package client provides a client for interacting with the frontend.
frontend/page
Package page defines common fields shared by pages when rendering templages.
Package page defines common fields shared by pages when rendering templages.
frontend/serrors
serrors contains error types used by the server
serrors contains error types used by the server
frontend/urlinfo
Package urlinfo provides functions for extracting information out of url paths.
Package urlinfo provides functions for extracting information out of url paths.
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/lazyregexp
Package lazyregexp is a thin wrapper over regexp, allowing the use of global regexp variables without forcing them to be compiled at init.
Package lazyregexp is a thin wrapper over regexp, allowing the use of global regexp variables without forcing them to be compiled at init.
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.
log
Package log supports structured and unstructured logging with levels.
Package log supports structured and unstructured logging with levels.
log/stackdriverlogger
Package log supports structured and unstructured logging with levels to GCP stackdriver.
Package log supports structured and unstructured logging with levels to GCP stackdriver.
lru
Package lru provides an LRU cache.
Package lru provides an LRU cache.
memory
Package memory provides functions to collect memory information from a variety of places.
Package memory provides functions to collect memory information from a variety of places.
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.
osv
Package osv implements the Go OSV vulnerability format (https://go.dev/security/vuln/database#schema), which is a subset of the OSV shared vulnerability format (https://ossf.github.io/osv-schema), with database and ecosystem-specific meanings and fields.
Package osv implements the Go OSV vulnerability format (https://go.dev/security/vuln/database#schema), which is a subset of the OSV shared vulnerability format (https://ossf.github.io/osv-schema), with database and ecosystem-specific meanings and fields.
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.
proxy/proxytest
Package proxytest supports testing with the proxy.
Package proxytest supports testing with the proxy.
queue
Package queue provides a queue interface that can be used for asynchronous scheduling of fetch actions.
Package queue provides a queue interface that can be used for asynchronous scheduling of fetch actions.
queue/gcpqueue
Package gcpqueue provides a GCP queue implementation that can be used for asynchronous scheduling of fetch actions.
Package gcpqueue provides a GCP queue implementation that can be used for asynchronous scheduling of fetch actions.
sanitizer
Package sanitizer provides a simple html sanitizer to remove tags and attributes that could potentially cause security issues.
Package sanitizer provides a simple html sanitizer to remove tags and attributes that could potentially cause security issues.
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.
static
Package static builds static assets for the frontend and the worker.
Package static builds static assets for the frontend and the worker.
stdlib
Package stdlib supports special handling of the Go standard library.
Package stdlib supports special handling of the Go standard library.
testenv
Package testenv provides information about what functionality is available in different testing environments run by the Go team.
Package testenv provides information about what functionality is available in different testing environments run by the Go team.
testing/fakedatasource
Package fakedatasource provides a fake implementation of the internal.DataSource interface.
Package fakedatasource provides a fake implementation of the internal.DataSource interface.
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.
trace
package trace provides a wrapper around third party tracing libraries.
package trace provides a wrapper around third party tracing libraries.
version
Package version handles version types.
Package version handles version types.
vuln
Package vulns provides utilities to interact with vuln APIs.
Package vulns provides utilities to interact with vuln APIs.
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.
tests
api
Command api computes the exported API of a set of Go packages.
Command api computes the exported API of a set of Go packages.
search
The search command is used to run tests for search using a dataset of modules specified at tests/search/seed.txt.
The search command is used to run tests for search using a dataset of modules specified at tests/search/seed.txt.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL