[website] doc: update macOS PATH instructions for go install tools

2 views
Skip to first unread message

Gerrit Bot (Gerrit)

unread,
Mar 16, 2026, 8:29:06 PM (2 days ago) Mar 16
to goph...@pubsubhelper.golang.org, Connie Ooi, golang-co...@googlegroups.com

Gerrit Bot has uploaded the change for review

Commit message

doc: update macOS PATH instructions for go install tools

Updates doc/install and doc/manage-install to explicitly mention adding the GOPATH bin directory to the user's PATH on macOS.

This addresses the suggestion made in: https://github.com/golang/go/issues/39531#issuecomment-1879299980

Specifically, added a note and example workflow setup instruction for appending export PATH="$PATH:$(go env GOPATH)/bin" to target shell profiles.
Change-Id: I00cbc17ba1575689f0fee676f2dd0c6d3ff53dd6
GitHub-Last-Rev: 5a849f18f597f0b4d993dc3f3a6a470c8ff40331
GitHub-Pull-Request: golang/website#351

Change diff

diff --git a/_content/doc/install.html b/_content/doc/install.html
index ea798fd..902c60f 100644
--- a/_content/doc/install.html
+++ b/_content/doc/install.html
@@ -146,6 +146,17 @@
<code>PATH</code> environment variable. You may need to restart any
open Terminal sessions for the change to take effect.
</p>
+ <p>
+ <strong>Note:</strong> To use tools installed via <code>go install</code>, you should also add the Go bin directory (typically <code>$HOME/go/bin</code>) to your <code>PATH</code>.
+ You can do this by adding the following line to your shell profile (e.g., <code>~/.zshrc</code> or <code>~/.bash_profile</code>):
+ </p>
+ <pre class="CopyPaste">
+ <span>export PATH="$PATH:$(go env GOPATH)/bin"</span>
+ <button aria-label="Copy and paste the code.">
+ <img class="CopyPaste-icon" src="/images/icons/copy-paste.svg" />
+ <img class="CopyPaste-icon CopyPaste-icon-dark" src="/images/icons/copy-paste-dark.svg" />
+ </button>
+ </pre>
</li>
<li>
Verify that you've installed Go by opening a command prompt and typing
diff --git a/_content/doc/manage-install.html b/_content/doc/manage-install.html
index c361a80..1b6d48c 100644
--- a/_content/doc/manage-install.html
+++ b/_content/doc/manage-install.html
@@ -94,6 +94,10 @@
Under Linux and FreeBSD, edit /etc/profile or $HOME/.profile. If you installed Go with the macOS package, remove the /etc/paths.d/go file.
</p>

+<p>
+<strong>Note:</strong> If you manually added the Go bin directory (e.g., <code>$HOME/go/bin</code>) to your shell profile for tools installed via <code>go install</code>, you should also remove that entry.
+</p>
+
</li>

</ol>

Change information

Files:
  • M _content/doc/install.html
  • M _content/doc/manage-install.html
Change size: S
Delta: 2 files changed, 15 insertions(+), 0 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: website
Gerrit-Branch: master
Gerrit-Change-Id: I00cbc17ba1575689f0fee676f2dd0c6d3ff53dd6
Gerrit-Change-Number: 755800
Gerrit-PatchSet: 1
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-CC: Connie Ooi <conn...@google.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Gopher Robot (Gerrit)

unread,
Mar 16, 2026, 8:29:09 PM (2 days ago) Mar 16
to Gerrit Bot, Connie Ooi, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gopher Robot added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Gopher Robot . unresolved

I spotted some possible problems with your PR:

  1. You have a long 146 character line in the commit message body. Please add line breaks to long lines that should be wrapped. Lines in the commit message body should be wrapped at ~76 characters unless needed for things like URLs or tables. (Note: GitHub might render long lines as soft-wrapped, so double-check in the Gerrit commit message shown above.)

Please address any problems by updating the GitHub PR.

When complete, mark this comment as 'Done' and click the [blue 'Reply' button](https://go.dev/wiki/GerritBot#i-left-a-reply-to-a-comment-in-gerrit-but-no-one-but-me-can-see-it) above. These findings are based on heuristics; if a finding does not apply, briefly reply here saying so.

To update the commit title or commit message body shown here in Gerrit, you must edit the GitHub PR title and PR description (the first comment) in the GitHub web interface using the 'Edit' button or 'Edit' menu entry there. Note: pushing a new commit to the PR will not automatically update the commit message used by Gerrit.

For more details, see:

(In general for Gerrit code reviews, the change author is expected to [log in to Gerrit](https://go-review.googlesource.com/login/) with a Gmail or other Google account and then close out each piece of feedback by marking it as 'Done' if implemented as suggested or otherwise reply to each review comment. See the [Review](https://go.dev/doc/contribute#review) section of the Contributing Guide for details.)

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: website
    Gerrit-Branch: master
    Gerrit-Change-Id: I00cbc17ba1575689f0fee676f2dd0c6d3ff53dd6
    Gerrit-Change-Number: 755800
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-CC: Connie Ooi <conn...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-Comment-Date: Tue, 17 Mar 2026 00:29:05 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Gopher Robot (Gerrit)

    unread,
    Mar 16, 2026, 8:32:21 PM (2 days ago) Mar 16
    to Gerrit Bot, Connie Ooi, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

    Message from Gopher Robot

    Congratulations on opening your first change. Thank you for your contribution!

    Next steps:
    A maintainer will review your change and provide feedback. See
    https://go.dev/doc/contribute#review for more info and tips to get your
    patch through code review.

    Most changes in the Go project go through a few rounds of revision. This can be
    surprising to people new to the project. The careful, iterative review process
    is our way of helping mentor contributors and ensuring that their contributions
    have a lasting impact.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: website
    Gerrit-Branch: master
    Gerrit-Change-Id: I00cbc17ba1575689f0fee676f2dd0c6d3ff53dd6
    Gerrit-Change-Number: 755800
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-CC: Connie Ooi <conn...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-Comment-Date: Tue, 17 Mar 2026 00:32:17 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Fred Sauer (Gerrit)

    unread,
    Mar 17, 2026, 12:02:59 AM (yesterday) Mar 17
    to Gerrit Bot, Connie Ooi, goph...@pubsubhelper.golang.org, Gopher Robot, golang-co...@googlegroups.com

    Fred Sauer added 9 comments

    Patchset-level comments
    Fred Sauer . resolved

    THANK YOU. A few suggestions for you.

    File _content/doc/install.html
    Line 144, Patchset 1 (Latest): The package installs the Go distribution to /usr/local/go. The package
    should put the /usr/local/go/bin directory in your

    <code>PATH</code> environment variable. You may need to restart any
    Fred Sauer . unresolved

    Let's document how the PATH is updated, so that we're mirror
    the uninstall instruction, e.g.:


    The package installs the Go distribution to /usr/local/go and
    adds the /usr/local/go/bin directory to your <code>PATH</code>
    environment variable by creating /etc/paths.d/go.

    Line 146, Patchset 1 (Latest): <code>PATH</code> environment variable. You may need to restart any

    open Terminal sessions for the change to take effect.
    Fred Sauer . unresolved

    Rather that this uncertain instruction, let's add this as
    an explicit final second-to-last step at the end of the
    installation steps, immediately before the "Verify that
    you've installed Go by opening…" step, e.g.


    Restart any open Terminal sessions for the changes to your
    PATH to take effect.


    <strong>Note:</strong> To use tools installed via <code>go install</code>, you should also add the Go bin directory (typically <code>$HOME/go/bin</code>) to your <code>PATH</code>.
    You can do this by adding the following line to your shell profile (e.g., <code>~/.zshrc</code> or <code>~/.bash_profile</code>):
    </p>
    <pre class="CopyPaste">

    <span>export PATH="$PATH:$(go env GOPATH)/bin"</span>
    <button aria-label="Copy and paste the code.">
    <img class="CopyPaste-icon" src="/images/icons/copy-paste.svg" />
    <img class="CopyPaste-icon CopyPaste-icon-dark" src="/images/icons/copy-paste-dark.svg" />
    </button>
    </pre>
    </li>
    Fred Sauer . unresolved

    Let's make this a distinct step instead of a note on an existing step, e.g.


    <li>
    Open the package file you downloaded and …
    </li>
    <li>
    Add the Go bin directory (typically <code>$HOME/go/bin</code>) to
    your <code>PATH</code>. This is the installation location that's
    used by <code>go install</code>.
    <p>

    You can do this by adding the following line to your shell profile
    (e.g., <code>~/.zshrc</code> or <code>~/.bash_profile</code>):
      </p>
    <pre class="CopyPaste">

    </pre>
    </li>
    File _content/doc/manage-install.html
    Line 91, Patchset 1 (Latest):<li>Remove the Go bin directory from your <code>PATH</code> environment variable.
    Fred Sauer . unresolved

    In the installation instructions we just refer to /usr/local/go.
    And, we reserve the term "Go bin" for $HOME/go/bin.

    So this phrase should read:


    Remove /usr/local/go

    Line 94, Patchset 1 (Latest):Under Linux and FreeBSD, edit /etc/profile or $HOME/.profile. If you installed Go with the macOS package, remove the /etc/paths.d/go file.
    Fred Sauer . unresolved

    We should break to a new line (<br>) or paragraph (<p>) so the macOS instructions are on equal footing with the Linux/FreeBSD instructions.

    Line 97, Patchset 1 (Latest):<p>
    Fred Sauer . unresolved

    Like with the install, make this a separate list item (<li>)
    vs. a note on the an existing list item.

    Line 98, Patchset 1 (Latest):<strong>Note:</strong> If you manually added the Go bin directory (e.g., <code>$HOME/go/bin</code>) to your shell profile for tools installed via <code>go install</code>, you should also remove that entry.
    Fred Sauer . unresolved

    Suggested edit:

    If you manually added the Go bin directory (typically
    <code>$HOME/go/bin</code>) to your shell profile, for example
    by adding <code>export PATH="$PATH:$(go env GOPATH)/bin"</code>,
    remove that entry.

    Line 91, Patchset 1 (Latest):<li>Remove the Go bin directory from your <code>PATH</code> environment variable.

    <p>

    Under Linux and FreeBSD, edit /etc/profile or $HOME/.profile. If you installed Go with the macOS package, remove the /etc/paths.d/go file.
    </p>

    <p>

    <strong>Note:</strong> If you manually added the Go bin directory (e.g., <code>$HOME/go/bin</code>) to your shell profile for tools installed via <code>go install</code>, you should also remove that entry.
    </p>

    </li>
    Fred Sauer . unresolved

    Recommend a separate <li> here as well

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: website
    Gerrit-Branch: master
    Gerrit-Change-Id: I00cbc17ba1575689f0fee676f2dd0c6d3ff53dd6
    Gerrit-Change-Number: 755800
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-CC: Connie Ooi <conn...@google.com>
    Gerrit-CC: Fred Sauer <fre...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-Comment-Date: Tue, 17 Mar 2026 04:02:55 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Gerrit Bot (Gerrit)

    unread,
    Mar 17, 2026, 9:13:41 PM (19 hours ago) Mar 17
    to Connie Ooi, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

    Gerrit Bot uploaded new patchset

    Gerrit Bot uploaded patch set #2 to this change.
    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: website
    Gerrit-Branch: master
    Gerrit-Change-Id: I00cbc17ba1575689f0fee676f2dd0c6d3ff53dd6
    Gerrit-Change-Number: 755800
    Gerrit-PatchSet: 2
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages