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: doc/articles/wiki clarification #25188
Comments
Thanks for reporting this. Would adding
at the end of this paragraph
be a good fix in your opinion? |
That would be super helpful! As I went further through the article(I've completed it now!), I would also update the remaining snippets that include the import statement to reflect the addition of the log like so: import (
"html/template"
"io/ioutil"
"log"
"net/http"
) In the future, are pull requests accepted for documentation changes? |
We do gladly accept PRs! If you are looking for a new task now that you completed the article, please feel free to submit a PR applying the changes you and I suggested here. https://github.com/golang/go/tree/master/doc/articles/wiki You might want to read http://golang.org/wiki/CommitMessage first. |
Maybe PR #24584 is related. |
Change https://golang.org/cl/148830 mentions this issue: |
This looks fixed |
What version of Go are you using (
go version
)?go version go1.10.1 windows/amd64
Does this issue reproduce with the latest release?
N/A
What operating system and processor architecture are you using (
go env
)?What did you do?
Following the wiki docs, I ran into an issue when getting to the following section: Using net/http to serve wiki pages.
The code sample explicitly says to add "net/http" to the import statement. It doesn't state to add "log", though it's also necessary. So when following along, a user will get a compilation error saying that log doesn't exist. It isn't until the user navigates to the "code so far" link does it show the need to add the import statement for log.
What did you expect to see?
I would expect the documentation to reflect the need to import both net/http and log at this point. If you're experienced in Go, then it may be obvious that you need to add an import statement for log. As a newer Gopher, this caused a situation where it's not entirely obvious that it was necessary to add until I looked at the code so far link.
The text was updated successfully, but these errors were encountered: