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
As a go programmer I create command line tools that I want to download and use on various machines. I'd like it to be as easy as possible to install those tools when I need them.
Until go1.18 it was possible to run go get github.com/superhuman/url64. This feature was moved to go install, and as part of that the syntax was changed to require @latest on the end, otherwise you (usually) get one of two possible error messages:
# in a module
$ go install github.com/superhuman/url64
no required module provides package github.com/superhuman/url64; to add it:
go get github.com/superhuman/url64
# not in a module
$ go install github.com/superhuman/url64
go: 'go install' requires a version when current directory is not in a module
Try 'go install github.com/superhuman/url64@latest' to install the latest version
I propose that:
In a module that has a specific version of github.com/superhuman/url64 in its go.mod: go install github.com/superhuman/url64 would act as it does today.
Otherwise (outside of a module, or in a module that does not have it as a dependency): go install github.com/superhuman/url64 should be equivalent to go install github.com/superhuman/url64@latest
This gives you the same behaviour as following the instructions in the current error messages, automatically.
The text was updated successfully, but these errors were encountered:
As a go programmer I create command line tools that I want to download and use on various machines. I'd like it to be as easy as possible to install those tools when I need them.
Until go1.18 it was possible to run
go get github.com/superhuman/url64
. This feature was moved togo install
, and as part of that the syntax was changed to require@latest
on the end, otherwise you (usually) get one of two possible error messages:I propose that:
github.com/superhuman/url64
in its go.mod:go install github.com/superhuman/url64
would act as it does today.go install github.com/superhuman/url64
should be equivalent togo install github.com/superhuman/url64@latest
This gives you the same behaviour as following the instructions in the current error messages, automatically.
The text was updated successfully, but these errors were encountered: