-
Notifications
You must be signed in to change notification settings - Fork 18k
x/website: Found an important typo in the text on first tutorial page. #51511
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
Comments
I believe that's not a typo but actually how you declare and use the variables in the go language. If I am understanding this right, you are referring to the following piece of code on the page:
This is another way of declaring variables and using them without using the ":=" operator. Also, it is mentioned that this is a long way of doing it just before the code block |
Yes. [Please someone confirm if that's right] |
The tutorial is correct. Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only. For questions please refer to https://github.com/golang/go/wiki/Questions |
If you can't explain an answer you admit that you don't understand the topic or didn't read the question. |
@differentstuff I'm sorry you feel disappointed. We've learned over the years that the GitHub issue tracker is a poor place for answering questions. The Go project has several active forums with more people who will respond faster and more interactively. So we direct people with questions to those forums, rather than the issue tracker. See https://go.dev/wiki/Questions. This has been a clearly better experience for most Go users. I'm sorry it doesn't feel that way in this instance. In Go a |
Thank you for the explanation. That confirms my question.
I totally understand the decission. I don't criticize this part. |
What is the URL of the page with the issue?
https://go.dev/doc/tutorial/create-module
What is your user agent?
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0
Screenshot
not needed
What did you do?
I tried to learn about golang, and read the first Tutorial page "Tutorial: Create a Go module".
At the end of the page it is explained with the sentence "In Go, the := operator is a shortcut for declaring..."
I found it very confusing that the following example does not contain a colon at all.
"message = fmt.Sprintf("Hi, %v. Welcome!", name)"
But, in the example above there is a colon.
"message := fmt.Sprintf("Hi, %v. Welcome!", name)"
That's how I finally understood that part.
That's just a small typo I think, but as a programming starter (as me) it can be very difficult to understand.
If ever this is NOT a typo, I hope someone could explain me the meaning of this part.
What did you expect to see?
A colon
What did you see instead?
nothing
The text was updated successfully, but these errors were encountered: