Skip to content

cmd/go: provide an easy way to fetch the "latest" commit version from the default branch #29761

@hyangah

Description

@hyangah

As described in go help module-get, go get with the version suffix
@latest chooses the latest tagged release version instead of the latest
commit if there are tagged versions in the vcs.

For example, go get -m golang.org/x/text currently fetches the v0.3.0
which is more than one year-old, pre-module tagged version.

Sometimes it's useful to check the availability of the latest untagged version
(pseudo-version). Users can figure it out using the default branch name
as the suffix (e.g. go get -m golang.org/x/text@master) but the default
branch name varies depending on repos so it requires a bit of digging and
knowledge about the vcs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.modules

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions