andrewslotin / go-proxy-pull-action

Pull the new release of a module to the Go proxy cache

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Always use latest go version available

tech10 opened this issue · comments

In looking through this, it occurred to me that the latest version of Go could be used in the Docker image, rather than explicitly specifying a version, 1.18 as of version 1.0.0. Would there be any problems with this?

It would be a simple modification, the FROM line in the Dockerfile would merely need to be changed to this.

FROM golang:alpine

Hey @tech10, thanks for the suggestion. This action uses Go only as a tool to make a request to proxy. For this purpose any Go version would suffice as long as it has modules support. I believe there is no benefit from always using the latest version, while not pinning the version introduces small, but still existing probability that the behavior of this action might be changed unintentionally.

I did think about that, but would it still work if you're attempting to update a module on the proxy cache which supports a version of Go later than 1.18, in this case? One that only supports 1.19 and above, for instance. I have no way to test this myself.

My guess would be that it’d be still enough to trigger the proxy, since it needs to download the go.mod to check the compatibility.

Hopefully so, I'll close this for now, then. If anyone does have a problem, they can refer to this and request that it be re-opened.

Thanks.