tour icon indicating copy to clipboard operation
tour copied to clipboard

tour: basics 1 gives a confusing example

Open psaikido opened this issue 7 months ago • 1 comments

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.

psaikido avatar Jul 24 '24 08:07 psaikido