Text of go.dev › doc › contribute as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Contribution Guide - The Go Programming Language

Documentation Contribution Guide Contribution Guide The Go project welcomes all contributors. This document is a guide to help you through the process of contributing to the Go project, which is a little different from that used by other open source projects. We assume you have a basic understanding of Git and Go. In addition to the information here, the Go community maintains a CodeReview wiki page. Feel free to contribute to the wiki as you learn the review process.

Note that the gccgo front end lives elsewhere; see Contributing to gccgo . Becoming a contributor Overview The first step is registering as a Go contributor and configuring your environment. Here is a checklist of the required steps to follow: Step 0 : Decide on a single Google Account you will be using to contribute to Go. Use that account for all the following steps and make sure that git is configured to create commits with that account's e-mail address.

Step 1 : Sign and submit a CLA (Contributor License Agreement). Step 2 : Configure authentication credentials for the Go Git repository. Visit go.googlesource.com , click "Generate Password" in the page's top right menu bar, and follow the instructions. Step 3 : Register for Gerrit, the code review tool used by the Go team, by visiting this page . The CLA and the registration need to be done only once for your account.

Step 4 : Install git-codereview by running go install golang.org/x/review/git-codereview@latest If you prefer, there is an automated tool that walks through these steps. Just run: $ go install golang.org/x/tools/cmd/go-contrib-init@latest $ cd /code/to/edit $ go-contrib-init The rest of this chapter elaborates on these instructions. If you have completed the steps above (either manually or through the tool), jump to Before contributing code .

Step 0: Select a Google Account A contribution to Go is made through a Google account with a specific e-mail address. Make sure to use the same account throughout the process and for all your subsequent contributions. You may need to decide whether to use a personal address or a corporate address. The choice will depend on who will own the copyright for the code that you will be writing and submitting. You might want to discuss this topic with your employer before deciding which account to use.

Google accounts can either be Gmail e-mail accounts, G Suite organization accounts, or accounts associated with an external e-mail address. For instance, if you need to use an existing corporate e-mail that is not managed through G Suite, you can create an account associated with your existing e-mail address . You also need to make sure that your Git tool is configured to create commits using your chosen e-mail address.

You can either configure Git globally (as a default for all projects), or locally (for a single specific project). You can check the current configuration with this command: $ git config --global user.email # check current global config $ git config user.email # check current local config To change the configured address: $ git config --global user.email name@example.com # change global config $ git config user.email name@example.com # change local config Step 1: Contributor License Agreement Before sending your first change to the Go project you must have completed one of the following two CLAs.

Which CLA you should sign depends on who owns the copyright to your work. If you are the copyright holder, you will need to agree to the individual contributor license agreement , which can be completed online. If your organization is the copyright holder, the organization will need to agree to the corporate contributor license agreement . You can check your currently signed agreements and sign new ones at the Google Developers Contributor License Agreements website.

If the copyright holder for your contribution has already completed the agreement in connection with another Google open source project, it does not need to be completed again. If the copyright holder for the code you are submitting changes—for example, if you start contributing code on behalf of a new company—please send mail to the golang-dev mailing list . This will let us know the situation so we can make sure an appropriate agreement is completed.

Step 2: Configure git authentication The main Go repository is located at go.googlesource.com , a Git server hosted by Google. Authentication on the web server is made through your Google account, but you also need to configure git on your computer to access it. Follow these steps: Visit go.googlesource.com and click on "Generate Password" in the page's top right menu bar. You will be redirected to accounts.google.com to sign in.

After signing in, you will be taken to a page with the heading "Configure Git". This page contains a personalized script that when run locally will configure Git to hold your unique authentication key. This key is paired with one that is generated and stored on the server, analogous to how SSH keys work. Copy and run this script locally in your terminal to store your secret authentication token in a .gitcookies file. If you are using a Windows computer and running cmd , you should instead follow the instructions in the yellow box to run the command; otherwise run the regular script.

Step 3: Create a Gerrit account Gerrit is an open-source tool used by Go maintainers to discuss and review code submissions. To register your account, visit go-review.googlesource.com/login/ and sign in once using the same Google Account you used above. Step 4: Install the git-codereview command Changes to Go must be reviewed before they are accepted, no matter who makes the change. A custom git command called git-codereview simplifies sending changes to Gerrit.

Install the git-codereview command by running, $ go install golang.org/x/review/git-codereview@latest Make sure git-codereview is installed in your shell path, so that the git command can find it. Check that $ git codereview help prints help text, not an error. If it prints an error, make sure that $GOPATH/bin is in your $PATH . On Windows, when using git-bash you must make sure that git-codereview.exe is in your git exec-path.

Run git --exec-path to discover the right location then create a symbolic link or just copy the executable from $GOPATH/bin to this directory. Before contributing code The project welcomes code patches, but to make sure things are well coordinated you should discuss any significant change before starting the work. It's recommended that you signal your intention to contribute in the issue tracker, either by filing a new issue or by claiming an existing one .

Where to contribute The Go project consists of the main go repository, which contains the source code for the Go language, as well as many golang.org/x/... repositories. These contain the various tools and infrastructure that support Go. For example, golang.org/x/pkgsite is for pkg.go.dev , golang.org/x/playground is for the Go playground, and golang.org/x/tools contains a variety of Go tools, including the Go language server, gopls .

You can see a list of all the golang.org/x/... repositories on go.googlesource.com . Check the issue tracker Whether you already know what contribution to make, or you are searching for an idea, the issue tracker is always the first place to go. Issues are triaged to categorize them and manage the workflow. The majority of the golang.org/x/... repos also use the main Go issue tracker. However, a few of these repositories manage their issues separately, so please be sure to check the right tracker for the repository to which you would like to contribute.

Most issues will be marked with one of the following workflow labels: NeedsInvestigation : The issue is not fully understood and requires analysis to understand the root cause. NeedsDecision : the issue is relatively well understood, but the Go team hasn't yet decided the best way to address it. It would be better to wait for a decision before writ

The rest of this page is on the live site.