Is it possible to to specify a Go version in a Taskfile?
When building a
Taskfile.yml, is it possible to specify the Go version used when building the application?
This is all I have in my Taskfile.yml:
4 Replies
Hi @HighDesertStorm,
Your Taskfile will call whatever
go binary is available in your PATH. You can call go version to know its version. If you want a different version, you'll need to install it yourself.@andreynering - what if Go is not installed? I saw it download Go when it’s not installed. I’m assuming it just using the version in the
go.mod file?@HighDesertStorm Task certainly won't download Go for you. It's a generic task runner: it will basically just run the commands you've configured on your Taskfile.
@andreynering that’s interesting… I deleted go from my system, ran the Taskfile that I put here and it listed a step and said it was downloading Go