You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
usage: get [-d] [-f] [-fix] [-insecure] [-t] [-u] [build flags] [packages]
...
When checking out or updating a package, get looks for a branch or tag
that matches the locally installed version of Go. The most important
rule is that if the local installation is running version "go1", get
searches for a branch or tag named "go1". If no such version exists it
retrieves the most recent version of the package.
...
The first is part is clear - it searches for "go1" branch/tag and if it finds it, go get will use it for obtaining sources.
The problematic part is at the end - If no such version exists it retrieves the most recent version of the package..
As far as I know, if go get can't find "go1" branch/tag, it will use project's default branch. However, docs (help pages) says otherwise.
I would like explanation on this, am I correct or are docs correct? If I'm correct, I guess it would be much better to say something along:
When checking out or updating a package, get looks for a branch or tag
that matches the locally installed version of Go. The most important
rule is that if the local installation is running version "go1", get
searches for a branch or tag named "go1". If no such branch or tag exists it
retrieves the default branch of the package.
In that case, changing it here should do the job and I can submit PR if needed/wanted -
What version of Go are you using (
go version
)?go version go1.8.1 linux/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
What did you see?
The first is part is clear - it searches for "go1" branch/tag and if it finds it,
go get
will use it for obtaining sources.The problematic part is at the end -
If no such version exists it retrieves the most recent version of the package.
.As far as I know, if
go get
can't find "go1" branch/tag, it will use project's default branch. However, docs (help pages) says otherwise.I would like explanation on this, am I correct or are docs correct? If I'm correct, I guess it would be much better to say something along:
In that case, changing it here should do the job and I can submit PR if needed/wanted -
go/src/cmd/go/internal/get/get.go
Line 65 in 178307c
Also, looking by the VCS code, it seems like it uses default branch (git's default behavior) - https://github.com/golang/go/blob/178307c3a72a9da3d731fecf354630761d6b246c/src/cmd/go/internal/get/vcs.go
The text was updated successfully, but these errors were encountered: