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

x/website:https://golang.org/doc/code #44518

Closed
ronaldpetty opened this issue Feb 23, 2021 · 2 comments
Closed

x/website:https://golang.org/doc/code #44518

ronaldpetty opened this issue Feb 23, 2021 · 2 comments
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@ronaldpetty
Copy link

Using https://golang.org/doc/code and Go 1.16.

The part where you use go install does not automatically download the remote package. What you see is in the document is:

$ go install example.com/user/hello
go: finding module for package github.com/google/go-cmp/cmp
go: downloading github.com/google/go-cmp v0.4.0
go: found github.com/google/go-cmp/cmp in github.com/google/go-cmp v0.4.0

What I got was:

$ go install example.com/user/hello
hello.go:7:2: no required module provides package github.com/google/go-cmp/cmp; to add it:
	go get github.com/google/go-cmp/cmp

After running go get github.com/google/go-cmp/cmp, rerunning produces:

$ go install example.com/user/hello
$

If I am correct, I am happy to update the document. If I am wrong, happy to learn why!

@gopherbot gopherbot added this to the Unreleased milestone Feb 23, 2021
@oiooj oiooj added Documentation help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Feb 23, 2021
@Usarneme
Copy link

Usarneme commented Mar 2, 2021

I am unable to reproduce the issue. Does this happen every time you enter the go install... command?

What are you seeing running which go and go version from the command line?
For example, I show: /usr/local/go/bin/go and go version go1.16 darwin/amd64

@ronaldpetty
Copy link
Author

Thanks @Usarneme for trying. I just reran the entire document in 1.16 and its working. I suspect I must have messed up GO111 while messing around trying to confirm things. If I see again, will repost. Sorry about that.

@golang golang locked and limited conversation to collaborators Mar 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants