Leaving aside whether this is a good idea, is there a way to structure go.mod so that the latest version of a dependency is always used?
The one way that I have discovered to do it is to, for example, have
require (
gonum.org/v1/gonum latest
)
which downloads and resolves to the latest version of gonum when using e.g. go get. However, that also updates my go.mod file, removing the latest tag.
Should I just keep the go.mod file in my git repository as a version containing the latest tag and allow users' versions to be updated when they build etc.?