Another option would be to use the snapped Go binaries. It won’t give you a choice down to the minor release level, but you can pick one of the available tracks. For example, putting the following in your snapcraft.yaml
:
build-snaps:
- go/1.11/stable
… will ask Snapcraft to install the Go snap from the stable channel of the 1.11 track. This can either go at the top level, or in the scope of a part. If you don’t care about the Go version, you can use:
build-snaps:
- go/latest/stable