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

tour: basics 1 gives a confusing example #1632

Open
psaikido opened this issue Jul 24, 2024 · 1 comment
Open

tour: basics 1 gives a confusing example #1632

psaikido opened this issue Jul 24, 2024 · 1 comment

Comments

@psaikido
Copy link

Context: https://go.dev/tour/basics/1

The description says:
"By convention, the package name is the same as the last element of the import path. For instance, the "math/rand" package comprises files that begin with the statement package rand."

..but the example is:
fmt.Println("My favorite number is", rand.Intn(10))

..which is not "package rand", just "rand". Because there is nowhere in the example that says "package rand" it's a bit confusing what is trying to be conveyed.

@FixTestRepeat
Copy link

I agree this section is a bit confusing.

I think what is trying to be conveyed is that the related files all begin package rand such as here, here, and here.

maybe someone with more experience can confirm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants