Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

website: In 'hello world', include GitHub repo and clarify user name #16584

Closed
MarkDBlackwell opened this issue Aug 3, 2016 · 1 comment
Closed
Labels
Documentation Issues describing a change to documentation. FrozenDueToAge
Milestone

Comments

@MarkDBlackwell
Copy link

Documentation webpage Getting Started—in section Test your installation—currently says:

Next, make the directories src/github.com/_user/hello inside your workspace (if you use GitHub, substitute your _user name for user),

The following would be better:

Next, make the directories src/github.com/user/_try-golang/hello inside your workspace (if you use GitHub, substitute your _GitHub user name for user),

(The bolding is just for emphasis in this issue.)

The new text aids novice Go users, in two ways:

  1. Novices will wonder where their GitHub repo names fit in the pattern. This will slow them down, and be frustrating. The new text supplies the answer (try-golang, in this case).
  2. "User name" seems (in effect) ambiguous here.

Novice Go users (by definition) are unfamiliar with the semantics of Go's workspace directory structure. For them (as well as generally, outside Go), the most commonly used context for the term "user name" is OS X, Linux or Windows—not GitHub.

Likely they'd assume the former (as I did). They can figure it out, but why include this stumbling block in the first place?

The new text specifies it means the GitHub user name.

This change aims to help smooth the path, for new Go language users.


  1. What version of Go are you using (go version)? N/A
  2. What operating system and processor architecture are you using (go env)? N/A
  3. What did you do? N/A
  4. What did you expect to see? N/A
  5. What did you see instead? N/A
@bradfitz bradfitz added the Documentation Issues describing a change to documentation. label Aug 3, 2016
@bradfitz bradfitz changed the title In 'hello world', include GitHub repo and clarify user name website: In 'hello world', include GitHub repo and clarify user name Aug 3, 2016
@bradfitz bradfitz added this to the Unreleased milestone Aug 3, 2016
@ALTree
Copy link
Member

ALTree commented Jan 11, 2017

That section has been rewritten for go1.8 after the introduction of default GOPATH, and there's now no reference to github.com/usr paths

Create your workspace directory, $HOME/go. (If you'd like to use a different directory, you will need to set the GOPATH environment variable; see How to Write Go Code for details.)

Next, make the directory src/hello inside your workspace, and in that directory create a file named hello.go that looks like:

...

So this is fixed.

@ALTree ALTree closed this as completed Jan 11, 2017
@golang golang locked and limited conversation to collaborators Jan 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation Issues describing a change to documentation. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

4 participants