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
doc/tutorial/call-module-code: recap the directory structure from the previous step? #41573
Comments
going up from hello see https://github.com/golang/go/wiki/Questions for the appropriate places to ask questions |
The (CC @stevetraut) |
Thanks, folks. I'll take a look. |
Hm. Step one in https://golang.org/doc/tutorial/call-module-code has the following, which is intended to cd up from where you were in the preceding topic (
|
Hi everyone, thank you for taking the time to read my concern. I don't know if this helps you any more... |
This is an old issue however I had the same issue so here is what I found to be the answer. You need to make a parent directory for both greetings and hello, like so; I made a GreetingsProject folder and then had a hello folder and a greetings folder. The "require" from the mod file in the file was auto generated by the command. If you look at the replace you can see they are going up one directory to find a folder named greetings. |
So this statement from https://golang.org/doc/tutorial/call-module-code doesn't make it clear that you might be in the "For example, if your current directory in the command prompt is the greetings directory, you could use the following commands:" Could you suggest wording that might make it clear? |
@stevetraut |
@hjctop1 @bcetienne See if the changes in this CL address your issues. They're due to be published before too long. https://go-review.googlesource.com/c/website/+/297531/7/_content/doc/tutorial/call-module-code.html |
I'm using go 1.16 on linux . Running |
Fixed with a diagram here: https://golang.org/doc/tutorial/call-module-code |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I followed the guidelines for learning Go on the official website.
I first did this part which is not a problem (https://golang.org/doc/tutorial/create-module) but in the second part (https://golang.org/doc/tutorial/call-module-code), the
build
command from the hello directory doesn't work.I tried again just copying and pasting the provided code but nothing changes.
Here is my
go.mod
file in the hello directory.Here is my structure
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: