About
[Link] is a companion website to [Link]. [Link] is the home of the open source
project and distribution, while [Link] is the hub for Go users providing centralized and
curated resources from across the Go ecosystem.
[Link] provides:
1. Centralized information for Go packages and modules published on
[Link].
2. Essential learning resources
3. Critical use cases & case studies
[Link] is currently in MVP status. We’re proud of what we’ve built and excited to share it with
the community. We hope you find value and joy in using [Link]. [Link] only has a small
portion of features we intend to build, and we are actively seeking feedback. If you have any
ideas, suggestions or issues, please let us know.
Adding a package
Data for the site is downloaded from [Link]. We monitor the Go Module Index
regularly for new packages to add to [Link]. If you don’t see a package on [Link],
you can add it by doing one of the following:
Visiting that page on [Link], and clicking the “Request” button. For example:
[Link]
Making a request to [Link] for the module version, to any endpoint specified
by the Module proxy protocol. For example:
[Link]
Downloading the package via the go command. For example:
GOPROXY=[Link] GO111MODULE=on go get
[Link]/my/
[email protected]Removing a package
If you are the author of a package and would like to have it removed from [Link], please
file an issue on the Go Issue Tracker with the path that you want to remove.
Note that we can only remove a module entirely from the site. We cannot remove it just for
specific versions.
Documentation
Documentation is generated based on Go source code downloaded from the Go Module
Mirror at [Link]/<module>/@v/<version>.zip. New module versions are
fetched from [Link] and added to [Link] site every few minutes.
The guidelines for writing documentation for the godoc tool apply to [Link].
It’s important to write a good summary of the package in the first sentence of the package
comment. The [Link] site indexes the first sentence and displays it in search results.
Build Context
Most Go packages look and behave the same regardless of the machine architecture or
operating system. But some have different documentation, even different exported symbols,
for different architectures or OSes. Some packages may not even exist for some
architectures.
Go calls an OS/architecture pair a “build context” and writes it with a slash, like
linux/amd64. You may also see the terms GOOS and GOARCH for the OS and architecture
respectively, because those are the names of the environment variables that the go command
uses. (See the go command documentation for more information.)
If a package exists at only one build context, [Link] displays that build context at the
upper right corner of the documentation. For example, [Link] displays
“js/wasm”.
If a package is different in different build contexts, then [Link] will display one by default
and provide a dropdown control at the upper right so you can select a different one.
For packages that are the same across all build contexts, [Link] does not display any
build context information.
Although there are many possible OS/architecture pairs, [Link] considers only a handful
of them. So if a package only exists for unsupported build contexts, [Link] will not
display documentation for it.
Source Links
Most of the time, [Link] can determine the location of a package’s source files, and
provide links from symbols in the documentation to their definitions in the source. If your
package’s source is not linked, try one of the following two approaches.
If [Link] finds a go-source meta tag on your site that follows the specified format, it
can often determine the right links, even though the format doesn’t take versioning into
account.
If that doesn’t work, you will need to add your repo or code-hosting site to [Link]’s list of
patterns (see Go Issue 40477 for context). Read about how to contribute to [Link], then
produce a CL that adds a pattern to the internal/source package.
Best practices
[Link] surfaces details about Go packages and modules in order to help provide
guidelines for best practices with Go.
Here are the details we surface:
Has [Link] file
The Go module system was introduced in Go 1.11 and is the official dependency
management solution for Go. A module version is defined by a tree of source files,
with a [Link] file in its root. More information about the [Link] file.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used,
modified, and redistributed. For more information on how [Link] determines
if a license is redistributable, see our license policy.
Tagged version
When the go get command resolves modules by default it prioritizes tagged
When the go get command resolves modules by default it prioritizes tagged
versions. When no tagged versions exist, go get looks up the latest known
commit. Modules with tagged versions give importers more predictable builds.
See [Link] and Keeping Your Modules Compatible for more information.
Stable version
Projects at v0 are assumed to be experimental. When a project reaches a stable
version — major version v1 or higher — breaking changes must be done in a new
major version. Stable versions give developers the confidence that breaking
changes won’t occur when they upgrade a package to the latest minor version.
See Go Modules: v2 and Beyond for more information.
Creating a badge
The [Link] badge provides a way for Go users to learn about the [Link] page
associated with a given Go package or module. You can create a badge using the badge
generation tool. The tool will generate html and markdown snippets that you can use on your
project website or in a README file.
Adding links
You can add links to your README files and package documentation that will be shown on
the right side of the [Link] page. For details, see this issue.
Keyboard Shortcuts
There are keyboard shortcuts for navigating package documentation pages. Type ‘?’ on a
package page for help.
Bookmarklet
The [Link] bookmarklet navigates from pages on source code hosts, such as GitHub,
Bitbucket, Launchpad etc., to the package documentation. To install the bookmarklet, click
and drag the following link to your bookmark bar: Pkg go dev Doc
and drag the following link to your bookmark bar: [Link] Doc
License policy
Information for a given package or module may be limited if we are not able to detect a
suitable license. See our license policy for more information.
Feedback
Share your ideas, feature requests, and bugs on the Go Issue Tracker For questions, please
post on the #tools slack channel on the Gophers Slack, or email the golang-dev mailing list.
Why Go Getting Started Discover About
Packages
Use Cases Playground Download
Case Studies Tour Blog
Stack Overflow Issue Tracker
Release Notes
Brand Guidelines
Code of Conduct
Connect
Twitter
Github
Slack
r/golang
Meetup
Golang Weekly
Copyright
Terms of Service
Privacy Policy
Report an Issue
[Link]